Question:
How can i ORDER BY php a set of data?
2011-12-08 11:44:14 UTC
I am getting data from a table and removing rows i dont need by setting a date limit. From the left over ones i am running another mysql_query and using those Invoice values I am sorting through the left over ones with basically the same query except that now i need to ORDER BY ___ ASC. Problem is the rows are limited to the ones i need but the ORDER BY just isnt doing anything... the dates are in a random order.
Three answers:
God
2011-12-08 11:49:43 UTC
Write your stored procedure so that it only returns the data you want, sorted as you want.

This is a mysql issue, not a php one.
raina_vissora
2011-12-08 12:18:06 UTC
It would help if you posted the actual queries instead of attempting to describe them...
Erika
2016-10-01 07:30:23 UTC
$result = mysql_query(/* despite question you go with for); jointly as ($row = mysql_fetch_array($result)) { // have exciting with the techniques! // say there is 3 rows, row1, row2, and row3 interior the table echo($row['row1'] . "
"); // echo row a million for each result echo($row['row2'] . "
"); // echo row 2 for each result echo($row['row3'] . "
"); // echo row 3 for each result }


This content was originally posted on Y! Answers, a Q&A website that shut down in 2021.
Loading...