talker Posted January 18, 2007 Share Posted January 18, 2007 Hi,My first post on this forum, i hope i get a good answer.I have a query that is working well.[code]Select * from table1 where name LIKE '%Jackson%';[/code]I want to add a limit for paginating, so i used:[code]Select * from table1 limit 0,10 where name LIKE '%Jackson%';[/code]But it gives this error:[code]Warning: mysql_numrows(): supplied argument is not a valid MySQL result resource in /home/places/public_html/results.php on line 52[/code] Please tell me how i can go around this , i want to limit the number of records so that i can paginate the results.Talker. Link to comment https://forums.phpfreaks.com/topic/34744-a-query/ Share on other sites More sharing options...
hvle Posted January 18, 2007 Share Posted January 18, 2007 Limit MUST be used last on query:"select * from table1 where name like '%jackson%' limit 0,10"; Link to comment https://forums.phpfreaks.com/topic/34744-a-query/#findComment-163802 Share on other sites More sharing options...
talker Posted January 18, 2007 Author Share Posted January 18, 2007 Hi,Thanks for the quick reply , its working like a charm.Thanks again. Link to comment https://forums.phpfreaks.com/topic/34744-a-query/#findComment-163812 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.