我已经在我的项目一个小要求:在Zend Framework中选择上个月的所有记录?
我想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
.....................
在这里,我想fetch
的previous month
一个particular client
的所有records
在Zend Framework.
例如:如果我想要client 1
个记录然后它应该显示我的记录:1,2,3 and 5.
请推荐一些代码或链接,可以帮助我......
在此先感谢
这也会返回超过1个月前的记录。 – Htbaa 2011-03-08 11:27:34
很好,你编辑了你的回复。这看起来更好。 – Htbaa 2011-03-08 12:34:04