turkman Posted March 3, 2010 Share Posted March 3, 2010 I'm wondering if its possible to get a record of all but the 100 most recent entries using the a lastpost datetime() i.e SELECT * FROM table WHERE replytoo = '0' ORDER BY Lastpost desc LIMIT(100,1000) so this query would put the most recently posted records on top then ignore the first 100 and extract 100 to 1000 for example ?? Can you use limit like this? Quote Link to comment https://forums.phpfreaks.com/topic/193996-help-with-limit-in-a-sql-query/ Share on other sites More sharing options...
Twister1004 Posted March 4, 2010 Share Posted March 4, 2010 I dont think you can use it like that. I believe you need to use mysql_select() or something, or use mysql_rows in a while loop and then echo those out. Quote Link to comment https://forums.phpfreaks.com/topic/193996-help-with-limit-in-a-sql-query/#findComment-1021188 Share on other sites More sharing options...
fenway Posted March 4, 2010 Share Posted March 4, 2010 Without the parens, that's valid syntax... but it's not very efficient. Quote Link to comment https://forums.phpfreaks.com/topic/193996-help-with-limit-in-a-sql-query/#findComment-1021456 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.