我已經在我的項目一個小要求:在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