hi all,

in this thread

http://groups.google.com/group/cake-php/browse_thread/thread/f23b1825050ad543/014092749592de70

Andy Dawson gave valuable information for searching HABTM related
models by
creating a dummy model for the HABTM lookup table.

> $constraint['PostsTag.tag_id'] = $tagId; // or pass an array to genereate "IN 
> (1,2,3..)" in the sql.

now here i want fields to be "AND-ed" while  "IN (1,2,3..)" generates
"OR-ed" fields.

i tried this:

$conditions['ArticlesRight']['right_id'] = Array("and" => array(1,2));
with the same result.

and this:

$conditions['ArticlesRight']['right_id'] = Array("and" =>
array("ArticlesRight" => Array("right_id" => 1, "right_id" => 2)));
which doesn't make sense, because the innermost Array has identical
keys.

how do i have to construct the array in order to achieve AND logic ?

thank you,

jyrgen


--~--~---------~--~----~------------~-------~--~----~
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?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to