BLAM! I successfully helped someone on this newsgroup! Sorry about
that, first time. Won't happen again.
On Oct 15, 4:17 pm, "Daehee Park" <[EMAIL PROTECTED]> wrote:
> Perfect, thanks so much!
>
> On Wed, Oct 15, 2008 at 3:54 PM, Chez17 <[EMAIL PROTECTED]> wrote:
>
> > I'm no expert but I think I maybe able to help. So lets assume you
> > have a php variable $lastWeek that has the date you want (7 days ago).
> > You create a find statement like this:
>
> > $result = $this->YourController->find('all', array('conditions' =>
> > array('Table.created >' => "$lastWeek")));
>
> > Make sure Table is the name of the table you want. You put the ">" or
> > what ever operator you want inside the quotes of the table name. I
> > think that should do it.
>
> > On Oct 15, 2:36 pm, Daehee <[EMAIL PROTECTED]> wrote:
> > > Hi,
>
> > > So I have a table with the "created" field. I am using query() in my
> > > model to select rows from this table, and I would like to create a SQL
> > > statement to only select up to 7 days previous of today. Please help
> > > with this the WHERE portion of this SQL statement... Thanks!
>
> > > Daehee
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"CakePHP" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/cake-php?hl=en
-~----------~----~----~----~------~----~------~--~---