Tag Archives: ORDER

Sorting using MySQL ORDER BY Statement

Sorting using PHP MySQL ORDER BY Statement




We use Sorting using MySQL  Order by statement in a recordset.The ORDER BY keyword sort the records in ascending order by default. If you want to sort the records in a descending order, you can use the DESC keyword. SELECT column_name(s) FROM table_name ORDER BY column_name(s) ASC|DESC You can sort on multiple columns, and you can sort different columns in different directions This query would return me the results ordered by the species in the order I need and then sort […]