Titan85
04-26-2007, 12:01 AM
Hello, I am having an issue with an sql query. Here is my code:
$get = mysql_query("SELECT * FROM `teams` ORDER BY name ASC LIMIT $cur, $max") or die ("Error Getting Teams! \n<br />\n" .mysql_error());When I run that I get this error:
Error Getting Teams!
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 '' at line 1When I take out the limit section or the order by section, it works. Any reason for this. Thanks
$get = mysql_query("SELECT * FROM `teams` ORDER BY name ASC LIMIT $cur, $max") or die ("Error Getting Teams! \n<br />\n" .mysql_error());When I run that I get this error:
Error Getting Teams!
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 '' at line 1When I take out the limit section or the order by section, it works. Any reason for this. Thanks