Re: generateList deprecated ... how to find a list with conditions?
http://groups.google.com/group/cake-php/browse_thread/thread/3a03f75d1c0fc378 On Jan 15, 3:03 am, jason m <[EMAIL PROTECTED]> wrote: > How about if you want a list with two fields like Post.id => > Post.title? --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Cake PHP" 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: generateList deprecated ... how to find a list with conditions?
How about if you want a list with two fields like Post.id => Post.title? --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Cake PHP" 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: generateList deprecated ... how to find a list with conditions?
$this->Post->find('list', array ('conditions' => array("Post.title" => "<> This is a post"') ); This will find the ones that are not equal. $this->Post->find('list', array ('conditions' => array("Post.title" => "This is a post"') , 'order'=>array('Post.title'=>'ASC') ); This will find all posts that Post.title="this is a post" and will order ascendant by Post.title --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Cake PHP" 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: generateList deprecated ... how to find a list with conditions?
find('list', array ('conditions' => array() ); On Jan 10, 2008 11:42 AM, aranworld <[EMAIL PROTECTED]> wrote: > > In the latest 1.2 Beta, I am noticing that generateList is deprecated > and to be replaced with find("list"). > > But how am I supposed to add a condition to the find if the first > argument is the string "list"? > > Can anyone help me figure out how to replicate a generateList with > conditions using the new proper syntax? > > > --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Cake PHP" 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 -~--~~~~--~~--~--~---
generateList deprecated ... how to find a list with conditions?
In the latest 1.2 Beta, I am noticing that generateList is deprecated and to be replaced with find("list"). But how am I supposed to add a condition to the find if the first argument is the string "list"? Can anyone help me figure out how to replicate a generateList with conditions using the new proper syntax? --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Cake PHP" 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 -~--~~~~--~~--~--~---