[RESOLVED] Easy SQL problem
im trying to search a table based on fname and sname fields
PHP Code:
$sql = "SELECT * FROM members WHERE fname, sname LIKE '%$search%'";
the above gives me a mysql error. but the following works when I search just the fname field
PHP Code:
$sql = "SELECT * FROM members WHERE fname LIKE '%$search%'";
anyone know the SQL syntax for searching more than one field? :thumb:
Re: [RESOLVED] Easy SQL problem
hehehe.... sorry about that... I felt off the LIKE on the first one didn't I?
-tg