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. Quote Link to comment 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"; Quote Link to comment 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. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.