Im a bit new to the model system, trying to understand how I would do
a query like so.

SELECT Friend.*, User.username, User.avatar, User.handler FROM friends
AS Friend, users AS User WHERE Friend.status = 'approved' AND
((user_id = ':user_id') OR (friend_id = ':user_id')) AND User.id =
Friend.user_id ORDER BY Friend.requestTime ASC LIMIT 0,5

It would also need pagination. It works similar to myspace/facebook
etc friend lists.
--~--~---------~--~----~------------~-------~--~----~
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