i'm building custom SQl query and need a little help. query: select distinct adverts.id, adverts.code from adverts left join images on (images.advert_id = adverts.id) left join options on (options.advert_id = adverts.id) where (SELECT count(1) FROM images WHERE adverts.id = images.advert_id) > 0 AND options.option IN (3, 4);
but i want to get all Advert records, where options.option has all these values (3,4). When i'm using IN(), these values are with OR operator, how to set AND? --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "CakePHP" 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?hl=en -~----------~----~----~----~------~----~------~--~---
