0

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.

a_horse_with_no_name
  • 497,550
  • 91
  • 775
  • 843
Antoine Duval
  • 342
  • 3
  • 20

1 Answers1

0

Thanks to jarlh, the answer is :

"SELECT * FROM taches ORDER BY taches.id ASC LIMIT 500 , 500".

Have a good day :D

Community
  • 1
  • 1
Antoine Duval
  • 342
  • 3
  • 20