Another SQL syntax error!
Posted: Sun Apr 05, 2009 4:23 pm
Greetings php technorati. Ok, I know this is probably a simple syntax error, but please
enlighten me. Here is the code:
Here is the error:
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 ' years_exp = '', degree ='', work_time ='', available ='' LIMIT 0, 2000' at line 1
tired of staring at variables. Please advise!!
Thanks in advance!
Batoe
enlighten me. Here is the code:
Code: Select all
[color=#4000BF]$query = "SELECT * FROM js_profile WHERE category ='$category', years_exp = '$years_exp',
degree ='$degree', work_time ='$work_time', available ='$available' LIMIT 0, 2000 ";
$result = mysql_query($query) or die(mysql_error());[/color]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 ' years_exp = '', degree ='', work_time ='', available ='' LIMIT 0, 2000' at line 1
Thanks in advance!
Batoe