Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Like function in select statement

Status
Not open for further replies.

hecheng

Programmer
Jun 23, 2003
7
CA
the following is my mysql_query statement

$result=mysql_query("select * from elementary where Location like '%".$_POST['textfield']."%'", $mylink);

If I input inToronto for my search string,
the result does not output the records that have
Toronto in them.

could anybody explain how i can fix the problem?

Thank you!!!
 
Check that the query looks ok

Code:
$q = "select * from elementary where Location like '%".$_POST['textfield']."%'";
echo $q;
$result=mysql_query($q, $mylink);
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top