Page 1 of 1
error
Posted: Thu Jul 08, 2004 6:50 pm
by pinehead18
You have an error in your SQL syntax. Check the manual that corresponds to your MySQL server version for the right syntax to use near '%pup%' at line 1
what does this error usually mean?
thank you
Anthony
Posted: Thu Jul 08, 2004 6:51 pm
by markl999
What does the full query look like?
Posted: Thu Jul 08, 2004 6:55 pm
by pinehead18
$sql = "SELECT * FROM users WHERE 1=1 AND user LIKE %$s%";
Posted: Thu Jul 08, 2004 6:57 pm
by markl999
You're missing the single quotes around the value,
$sql = "SELECT * FROM users WHERE 1=1 AND user LIKE '%$s%'";
Posted: Thu Jul 08, 2004 7:00 pm
by pinehead18
haha thanks man!!