$query = mysql_query('SELECT * from rbf_edades_news order by month DESC '.$query = mysql_query('SELECT * from rbf_edades_news order by month and DESC '.$limit.'');
谢谢!
我有一个mysql数据库,如下所示:Timestamp是一种datetime数据类型,我需要获取按月、日和小时分组的数据。我使用mysql和php编写脚本。通过以下查询,我可以按月和按天完成此操作:
$query = "SELECT COUNT(id) as totals FROM security_transactions WHERE YEAR(timestamp) = 2012 GROUP BY MONTH(timestamp), DA