sanjdhiman
Programmer
Hi htere im using Windowx Xp Home , php and apache i nthe normal way
I have the following problem
ok im running the following sql query in a php script
$search= mysql_query("SELECT * FROM propertyforsale WHERE NoBedrooms>=$minBed AND Region LIKE '%'$leicester"
;
The problem lies with the LIKE section of the query. It cant recognise the string, it leaves it as blank so something, i have tried so many ways of writing the like section e.g.
Region LIKE '%$leicester'
Region LIKE \"'%$leicester'\"
etc etc.. but cant seem to get it owrking
i thought i did get it working
BUT when i added the second like to it, it messed up
I dont know how im supposed to write the LIKE bit of the statement so that it work like it does in mySQL
I ran the same SQL in mySQL with a few tweeks and it worked perfectly
please could someone help
thanks in advance
sanj
I have the following problem
ok im running the following sql query in a php script
$search= mysql_query("SELECT * FROM propertyforsale WHERE NoBedrooms>=$minBed AND Region LIKE '%'$leicester"
The problem lies with the LIKE section of the query. It cant recognise the string, it leaves it as blank so something, i have tried so many ways of writing the like section e.g.
Region LIKE '%$leicester'
Region LIKE \"'%$leicester'\"
etc etc.. but cant seem to get it owrking
i thought i did get it working
BUT when i added the second like to it, it messed up
I dont know how im supposed to write the LIKE bit of the statement so that it work like it does in mySQL
I ran the same SQL in mySQL with a few tweeks and it worked perfectly
please could someone help
thanks in advance
sanj