Php mysql order by clause

The ORDER BY clause is used to sort the data in ascending order(by default) or in descending order.

To sort the records in a ascending order, you can use the ASC keyword.
To sort the records in a descending order, you can use the DESC keyword.
Syntax
SELECT column_name FROM table_name ORDER BY column_name ASC|DESC

No comments:

Post a Comment

Related Posts Plugin for WordPress, Blogger...