mercredi 20 mai 2015

SQL - How to ignore a $nb result?

I have to print some SQL's select's requests answers on a web page.
Because it's a to large result, i need to print it 500 per 500.
Like phpmyadmin, how can i say (with a SQL request) to get my results per 500 ?

Actualy i'm doing like this :

SELECT * FROM taches WHERE id<=1435 ORDER BY id DESC LIMIT 500

And updating the id limit at every click on the "next button". Can i say to SQL something like this :

SELECT * FROM taches ORDER BY id DESC LIMIT 500 EXCEPTFIRSTRESULT 500

(I know this can't work, but is it possible with an other way ? Thanks.




Aucun commentaire:

Enregistrer un commentaire