You probably did not understand SQL / IN. FOO IN (1,2,3) means FOO can be 1 OR 2 OR 3 or to express it other ways FOO is contained in the list afterwards.
While I am not sure which is faster and what the "internal" differences are, the result (should be) is the same. I am not sure if you can enforce cake but you might try: 'AppSetting.name' => array('OR => array('this', 'that')), // see cake book complex find conditions On Nov 2, 12:47 pm, "Prof. No Time" <libertylivingst...@gmail.com> wrote: ... > SELECT `AppSetting`.`id`, `AppSetting`.`name`, `AppSetting`.`value`, > `AppSetting`.`created`, `AppSetting`.`modified` FROM `app_settings` AS > `AppSetting` WHERE `AppSetting`.`name` IN ('EMAIL_HEADER_HTML', > 'EMAIL_FOOTER_HTML', 'EMAIL_HEADER_TEXT', 'EMAIL_FOOTER_TEXT') > > As you can see from above, it generates to an IN SQL query, I do not > want an IN SQL query what I want is this: > > SELECT `AppSetting`.`id`, `AppSetting`.`name`, `AppSetting`.`value`, > `AppSetting`.`created`, `AppSetting`.`modified` FROM `app_settings` AS > `AppSetting` > (WHERE `AppSetting`.`name` = 'EMAIL_HEADER_HTML' OR > `AppSetting`.`name` = 'EMAIL_FOOTER_HTML' OR `AppSetting`.`name` = > 'EMAIL_HEADER_TEXT' OR `AppSetting`.`name` = 'EMAIL_FOOTER_TEXT') > > Please how do I write the "find()" syntax to achieve this? Or am I > missing a point here? Is the 'IN' syntax equivalent (100%) to the 'OR' > syntax I desire? > > Cheers. --~--~---------~--~----~------------~-------~--~----~ 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 cake-php+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php?hl=en -~----------~----~----~----~------~----~------~--~---