userxöa userxöa - 4 months ago 8
SQL Question

In Paging how to show items with bigger ID first

I use on my website paging script from http://www.techumber.com/2012/08/simple-pagination-with-php-mysql.html .
What I should do if I'd like to see first data that has bigger ID number in database?

Answer

in sql? use the order by keyword and with desc you can sort it descending:

select ... from ... where ... order by ID desc
Comments