使用日期动态查询cakephp2

时间:2017-10-02 19:38:19

标签: cakephp

如何在cakephp2中进行查询,使用表单中的动态日期

SELECT centro_id, (sum(timestampdiff(minute, hora_inicio, hora_fin)))/(720*(SELECT datediff(date_format(now(), '%Y-%m-%d'), '2013-07-01')))*100 FROM `sesions` where fecha BETWEEN '2013-07-01' and date_format(now(), '%Y-%m-%d') GROUP BY 1;

0 个答案:

没有答案