Re: newbie syntax question for cake 1.2 RC1
thanks what about Not Equals I don't think <> works anymore. What is it replaced by? On Fri, Jun 6, 2008 at 2:57 AM, grigri <[EMAIL PROTECTED]> wrote: > > $this->Category->find('all', array( > 'conditions' => array( >'name LIKE' => '%'.$parent.'%', >'parent_id' => null > ) > )); > > On Jun 6, 10:26 am, . <[EMAIL PROTECTED]> wrote: > > Hi > > > > I just switched from cake 1.2.6311 to cake 1.2.7125 (RC1) > > > > what is the new syntax for this command? > > > > $this->Category->findByName(array('name' =>'LIKE %'.$parent.'%', > > 'parent_id'=>null)); > > > > I want to find all categories where the name is like %parent% and the > > parent_id is null > > > > Thanks > > > --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "CakePHP" group. To post to this group, send email to cake-php@googlegroups.com 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 -~--~~~~--~~--~--~---
Re: newbie syntax question for cake 1.2 RC1
$this->Category->find('all', array( 'conditions' => array( 'name LIKE' => '%'.$parent.'%', 'parent_id' => null ) )); On Jun 6, 10:26 am, . <[EMAIL PROTECTED]> wrote: > Hi > > I just switched from cake 1.2.6311 to cake 1.2.7125 (RC1) > > what is the new syntax for this command? > > $this->Category->findByName(array('name' =>'LIKE %'.$parent.'%', > 'parent_id'=>null)); > > I want to find all categories where the name is like %parent% and the > parent_id is null > > Thanks --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "CakePHP" group. To post to this group, send email to cake-php@googlegroups.com 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 -~--~~~~--~~--~--~---
Re: newbie syntax question for cake 1.2 RC1
Not aware that the syntax has changed. It would break a lot of apps if it had. I would do a plain vanilla findAll in that situation - I don't thing you can pass any more than a value to findBy and it would only return the first record anyway. On 6 Juny, 11:26, . <[EMAIL PROTECTED]> wrote: > Hi > > I just switched from cake 1.2.6311 to cake 1.2.7125 (RC1) > > what is the new syntax for this command? > > $this->Category->findByName(array('name' =>'LIKE %'.$parent.'%', > 'parent_id'=>null)); > > I want to find all categories where the name is like %parent% and the > parent_id is null > > Thanks --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "CakePHP" group. To post to this group, send email to cake-php@googlegroups.com 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 -~--~~~~--~~--~--~---
newbie syntax question for cake 1.2 RC1
Hi I just switched from cake 1.2.6311 to cake 1.2.7125 (RC1) what is the new syntax for this command? $this->Category->findByName(array('name' =>'LIKE %'.$parent.'%', 'parent_id'=>null)); I want to find all categories where the name is like %parent% and the parent_id is null Thanks --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "CakePHP" group. To post to this group, send email to cake-php@googlegroups.com 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 -~--~~~~--~~--~--~---