you can also have >, < and stuff like that just put it like 'Post.category_id'=>'< ' + $id
for a strange one.
really you want to avoid the custom sql (using ->query) as much as possible IMHO read the manual section on model for more information http://manual.cakephp.org/chapter/models
your conditions can be an array or a string (I tend to prefer the array notation)
sam D
On 8/18/06, c_doug <[EMAIL PROTECTED]> wrote:
Thanks, I'll try that as soon as I get a chance. Can you please tell me
how (or if it is possible) to have multiple conditions in the array?
Similar to: WHERE category_id = 1 AND author = 'me'.
Also at what point of complexity or when is it just better to use SQL
in your model?
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Cake PHP" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at http://groups.google.com/group/cake-php
-~----------~----~----~----~------~----~------~--~---
- Re: Filtering Data Samuel DeVore
- Re: Filtering Data Mikee Freedom
- Re: Filtering Data c_doug
- Re: Filtering Data [EMAIL PROTECTED]
- Re: Re: Filtering Data Samuel DeVore
