Hey, beautiful! Works really nice, I'm starting to LOVE the strtotime()- function :)
Thanks again, DD On 11 Mrz., 02:32, thatsgreat2345 <thatsgreat2...@gmail.com> wrote: > I'm assuming you have a column in the database called created which > cake will fill in automatically > If you check the book it gives you an example > herehttp://book.cakephp.org/#!/view/1017/Retrieving-Your-Dataunder the > complex find conditions > > $conditions = array( "Post.created >" => date('Y-m-d', strtotime("-1 > weeks"))); > $this->Model->find('all',array('conditions'=>$conditions)); > > On Mar 10, 4:22 pm, DigitalDude <e.blumsten...@googlemail.com> wrote: > > > Hey, > > > I just can't figure this out, but I need a find for fetching all > > records that were created "thisweek" or "lastweek". > > > To clarify this, I'm running a cronjob every sunday and create some > > reports for each user. I need to find every record that was created > > within the endingweek. When the cronjob is running sunday evening, it > > should fetch all data from theweekfrom monday till the sunday the > > cron job is running. > > > Is there any chance doing this in a normal Cake find? I think with an > > SQL statement this one is not so difficult but I really hate having > > straight SQL statements within my cake applications. > > > So if anyone would have a simple example for this, I would be ver > > happy! > > > Regards, > > > DD -- Our newest site for the community: CakePHP Video Tutorials http://tv.cakephp.org Check out the new CakePHP Questions site http://ask.cakephp.org and help others with their CakePHP related questions. To unsubscribe from this group, send email to cake-php+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php