I have this mysql Table:
+--------------------+---------+-------+
| date | query | count |
|--------------------+---------+-------|
|2012-11-18 09:52:00 | Michael | 1 |
|2012-11-18 10:47:10 | Tom | 2 |
|2012-11-17 15:02:12 | John | 1 |
|2012-11-17 22:52:10 | Erik | 3 |
|2012-11-16 09:42:01 | Larry | 1 |
|2012-11-16 07:41:33 | Kate | 1 |
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
and so on. I can simply take results and order them by date in one row via this code:
$queries = mysql_query("SELECT * FROM my_tables ORDER BY date DESC LIMIT 20");
while($row = mysql_fetch_array($queries)){
echo "Name ".$row['query']."";
}
But how to display elements from table ordered by specific date like this:
In 2012-11-18:
Michael
Tom
In 2012-11-17:
John
Erik
In 2012-11-16:
Larry
Kate
and so on. Thanks!
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…