On Tue, Mar 2, 2010 at 8:41 PM, Webdesign Porto <[email protected]>wrote:

> 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) OR
> (`friendships`.friend_id = 1)) AND ((`friendships`.`accepted` = 0)))
> ORDER BY friendships.updated_at LIMIT 0, 10
>
> more or less, this is the query. How do I make it a has many with
> belongs_to?
> I really dont know how to do it.. :s im working on it for 3-4 days...
> and still no answer. I dont use to ask for help in forums, but now... i
> really need some help here.
>
> Thanks! ;)
>

Hi, I understand the query but I'm not clear as to your exact question?
Can you post the relevant models for the above and provide some
information as to what you're wanting to do?

-Conrad

--
> 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]<rubyonrails-talk%[email protected]>
> .
> For more options, visit this group at
> http://groups.google.com/group/rubyonrails-talk?hl=en.
>
>

-- 
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