daveh33 Posted January 8, 2008 Share Posted January 8, 2008 $result = mysql_query("SELECT DISTINCT(number) FROM $tablename LIMIT $lp, 10000") or die(mysql_error()); this line of code produces 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 ' 10000' at line 1 any ideas why? Link to comment https://forums.phpfreaks.com/topic/84989-solved-mysql-limit-query/ Share on other sites More sharing options...
asmith Posted January 8, 2008 Share Posted January 8, 2008 echo it , that's the thing i always do , you have some variables in that query , echo only the query (from "select...) and see what it shows , then you'll find it . Link to comment https://forums.phpfreaks.com/topic/84989-solved-mysql-limit-query/#findComment-433397 Share on other sites More sharing options...
adam291086 Posted January 8, 2008 Share Posted January 8, 2008 change to this $result = mysql_query("SELECT DISTINCT(number) FROM $tablename LIMIT '$lp', 10000") or die(mysql_error()); Link to comment https://forums.phpfreaks.com/topic/84989-solved-mysql-limit-query/#findComment-433406 Share on other sites More sharing options...
daveh33 Posted January 8, 2008 Author Share Posted January 8, 2008 Thanks I updated to that line of code - the error changed slightly: - 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 ''0', 10000' at line 1 Link to comment https://forums.phpfreaks.com/topic/84989-solved-mysql-limit-query/#findComment-433407 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.