how can i retrieve the top 20 from a table, then the next 20 records?
can anybody help
Printable View
how can i retrieve the top 20 from a table, then the next 20 records?
can anybody help
You could start by telling your query to ORDER BY id, or some unique Integer...then, clause it with LIMIT 20.
Get the ID of your 20th item, and place it in some variable, "LastAccessed". Then, for the next query, "SELECT * FROM table WHERE id > lastAccessed ORDER BY id ASC LIMIT 20".
Repeat step two :) ("Get the ID of your 20th item, and place...")
This should work for ya.