$query = "SELECT * FROM makale ORDER BY date ASC";
how can I add another ORDER after date ...?
I want rows ordered by dates and if same dates will be ordered by name ?
How can I do that?
$query = "SELECT * FROM makale ORDER BY date ASC";
how can I add another ORDER after date ...?
I want rows ordered by dates and if same dates will be ordered by name ?
How can I do that?
You can add after first field:
$query = "SELECT * FROM makale ORDER BY date ASC, name DESC";
You can read, about this, here
To add multiple order conditions to your SQL query you can just list them separated by commas, i.e.
SELECT * FROM makale ORDER BY date ASC, name
This will order the results by date first then if there are the same dates it will order them according to their names. NOTE:- Order preference will be set by the order of columns occurring in your query. Check this out for more info https://www.dofactory.com/sql/order-by