I am looking to order a set of results of a mySQL data by quarter. They have data fields, so I am wondering if I should be doing this in PHP or in the query itself?
You can use GROUP BY Clause in mysql query and return results as -
group by Quarter(date)
Where Quarter is a pre-defined function in mysql.
我会在数据库中执行此操作-查找MySQL函数Quarter(Date)。
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.