Last night i thought on this problem and I solved it with this logic:
( SQL Syntax)

[code]
SELECT * FROM posts WHERE id IN(
    SELECT foreign_key FROM acos
    WHERE id IN(
        SELECT aco_id FROM aros_acos WHERE
               aro_id=(SELECT id FROM aros WHERE alias='User:2')
               AND
               aco_id IN (SELECT id FROM acos WHERE model='Post')
               AND
               _read=1
        )
)
[/code]

Check out the new CakePHP Questions site http://cakeqs.org and help others with 
their CakePHP related questions.

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

Reply via email to