PDA

View Full Version : php help needed



Archbob
March 5th, 2003, 21:30
$r="SELECT * FROM cl_entries where EntryName or Description LIKE '%$look%'";


This code is onyl matching description and not EntryName, I'm sure I got the field name right.

Running mySQL 3.23.54

kabatak
March 6th, 2003, 08:16
Try this

r="SELECT * FROM cl_entries where EntryName LIKE '%$look%' OR Description LIKE '%$look%'";

Archbob
March 6th, 2003, 17:38
Thanks, it worked. I guess my two servers which I was working with were running different versions of mySQL and thats why my code worked on one and not the other.