Hi,
bit of a noob so this could well be my problem (isn't it always ;)
I'm doing a little date comparison such as you suggested
> 2)
> $conditions['Post.created'] = 'BETWEEN 2007-02-01 AND 2007-02-28';
> (iirc)
but not getting any results. So I dumped out the contents of the cake
generated S
I'm trying to find all Posts within a given range of dates (the month
of February 2007 in this example), and I can't figure it out.
This isn't returning any results:
$conditions['Post.created'] = array('>= 2007-02-01', '<= 2007-02-28');
$this->Post->findAll($conditions);
The strange part is that
Thanks, AD! That cleared up a lot for me. You're posts are always so
informative. I'm going to star this for later.
On Mar 1, 1:03 am, "AD7six" <[EMAIL PROTECTED]> wrote:
> On Mar 1, 4:18 am, "BlenderStyle" <[EMAIL PROTECTED]> wrote:
>
> > I figured it out. I did this:
> > $conditions[]['Post.cre
On Mar 1, 4:18 am, "BlenderStyle" <[EMAIL PROTECTED]> wrote:
> I figured it out. I did this:
> $conditions[]['Post.created'] = '>= 2007-02-01';
> $conditions[]['Post.created'] = '<= 2007-02-28';
> $this->Post->find($conditions);
>
> It seems the complex conditions section in the model chapter in
I figured it out. I did this:
$conditions[]['Post.created'] = '>= 2007-02-01';
$conditions[]['Post.created'] = '<= 2007-02-28';
$this->Post->find($conditions);
It seems the complex conditions section in the model chapter in the
CakePHP Manual was wrong. It seems as Cake continues, the manual just
I figured it out. I did this:
$conditions[]['Post.created'] = '>= 2007-02-01';
$conditions[]['Post.created'] = '<= 2007-02-28';
$this->Post->find($conditions);
It seems the complex conditions section in the model chapter in the
CakePHP Manual was wrong. It seems as Cake continues, the manual just
It's worth noting that this isn't working either:
$conditions['Post.id'] = array('>= 1', '<= 10');
$this->Post->findAll($conditions);
I think I don't understand how Cake deals with these ranges.
On Feb 28, 4:10 pm, "BlenderStyle" <[EMAIL PROTECTED]> wrote:
> I'm trying to find all Posts within a