![](/img/trans.png)
[英]what is the best way to call data from MySQL with speed and security in mind?
[英]what is the best way to call a group of results from mySQL by quarter?
我正在按季度訂購一組mySQL數據的結果。 它們具有數據字段,所以我想知道應該在PHP還是在查詢本身中執行此操作?
您可以在mysql查詢中使用GROUP BY子句,並將結果返回為-
group by Quarter(date)
其中Quarter是mysql中的預定義函數。
我會在數據庫中執行此操作-查找MySQL函數Quarter(Date)。
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.