1bigbear Posted November 9, 2009 Share Posted November 9, 2009 I am trying to get 10 entries from a database, but how to do this, the entries have an id number if I take them according with the id number some problems will appear when I delete some of the entries. What to do? Quote Link to comment Share on other sites More sharing options...
Mchl Posted November 9, 2009 Share Posted November 9, 2009 SELECT * FROM table WHERE ... LIMIT 10 Quote Link to comment Share on other sites More sharing options...
1bigbear Posted November 9, 2009 Author Share Posted November 9, 2009 I found this $sql="SELECT * FROM data order by id desc limit 10"; but what to use so that query gets only the id that is lower that 1000? Quote Link to comment Share on other sites More sharing options...
gizmola Posted November 9, 2009 Share Posted November 9, 2009 I'd highly recommend a decent tutorial on SQL. $sql="SELECT * FROM data WHERE id 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.