【发布时间】:2011-07-11 01:03:00
【问题描述】:
我的项目有一个小需求:
我想fetch all the records of the previous month from the database.
structure of the table如下:
id clientid task date
1 1 1 01.Feb.2011 12:13
2 1 1 05.Feb.2011 15:22
3 1 0 09.Feb.2011 14:17
4 2 1 11.Feb.2011 19:53
5 1 0 19.Feb.2011 14:27
6 2 1 23.Feb.2011 09:53
7 1 0 01.Mar.2011 14:17
8 2 1 01.Mar.2011 19:53
9 1 0 03.Mar.2011 14:67
10 2 1 03.Mar.2011 09:53
.....................
这里我想fetchparticular clientprevious monthrecordsZend Framework.中的所有records
例如:如果我想要client 1 记录,那么它应该显示记录:1,2,3 and 5.
请推荐一些代码,或者链接对我有帮助......
提前致谢
【问题讨论】:
标签: php mysql zend-framework datetime