On May 27, 4:21 am, squidliberty <[EMAIL PROTECTED]> wrote:
> The $conditions I specify above create the following sql bit:
> WHERE NOT (`Listing`.`expiration` BETWEEN '1' AND '1180232564') AND
> (`Listing`.`title` LIKE '%cat%') OR (`Listing`.`description` LIKE '%cat
> %') AND (`Listing`.`title` LIKE '%dog%') OR (`Listing`.`description`
> LIKE '%dog%')
>
> I believe that what I need would be this:
> WHERE NOT (`Listing`.`expiration` BETWEEN '1' AND '1180232564') AND
> ((`Listing`.`title` LIKE '%cat%') OR (`Listing`.`description` LIKE
> '%cat%')) AND ((`Listing`.`title` LIKE '%dog%') OR
> (`Listing`.`description` LIKE '%dog%'))
>
> Note the extra parenthesis, creating the logic "X and (A or B) and (M
> or N)". How do I create groups like this?

It should do that anyway, since thats pretty much the point of an OR.
What revision are you using and If you use the latest code, does that
still happen?

I guess you didnĀ“t like this bit:
> > http://www.google.com/search?q=online+sql+format + http://bin.cakephp.org = 
> > readable output.

Cheers,

AD


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

Reply via email to