SELECT (profiles.*, friendships.updated_at AS friendship_updated_at,
friendships.profile_id, friendships.friend_id, friendships.accepted AS
friendship_accepted, friendships.rejected AS friendship_rejected FROM
`profiles` INNER JOIN `friendships` ON `profiles`.id =
`friendships`.profile_id WHERE (((`friendships`.profile_id = 1))) AND 
((`friendships`.`accepted` = 0))))
UNION
SELECT (profiles.*, friendships.updated_at AS friendship_updated_at,
friendships.profile_id, friendships.friend_id, friendships.accepted AS
friendship_accepted, friendships.rejected AS friendship_rejected FROM
`profiles` INNER JOIN `friendships` ON `profiles`.id =
`friendships`.profile_id WHERE (((`friendships`.friend_id = 1))) AND 
((`friendships`.`accepted` = 0))))
ORDER BY friendships.updated_at LIMIT 0, 10

lool
this is the new query I need.. It's a little bit more complicated right 
now...
any help? :(

thanks, for your time
-- 
Posted via http://www.ruby-forum.com/.

-- 
You received this message because you are subscribed to the Google Groups "Ruby 
on Rails: Talk" 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/rubyonrails-talk?hl=en.

Reply via email to