[英]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.