I have nice SQL query which makes most of the work for me, but i have
no plan how to convert it to a cakephp conform condition array. I'm
aware of the possibility to make a custom query, but i'm trying to
avoid this.
May someone can help me with this?
Here is the statement:
SELECT DATE_FORMAT(created, '%d.%m.%Y') AS sdate, COUNT(savedtime) AS
saved , COUNT(encashedtime) AS encashed FROM users_books WHERE
voucher_id IN (8, 124, 120)
AND created <= NOW()
AND DATE_SUB(NOW(), INTERVAL 30 DAY)
GROUP BY sdate
ORDER BY sdate
Thx
voocake
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "CakePHP" group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to cake-php+unsubscribe@googlegroups.com
For more options, visit this group at http://groups.google.com/group/cake-php?hl=en
-~----------~----~----~----~------~----~------~--~---
No comments:
Post a Comment