Thanks so so much AD7six,

Your suggestion of Router::url() worked like magic but for the second
suggestion on the query, I tried it and the debug dump gave me this:

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
-~----------~----~----~----~------~----~------~--~---

Reply via email to