Query Multiple tables

PalaniKannan K
Mon, 13 Sep 2010 10:59:19 -0000

Hi,

select * from table1 inner join table2 on table1.foreign_key table2.foreign_key

select * from table1 inner join table2 on table1.foreign_key table2.foreign_key
join table3 on table2.foreign_key=table3.foreign_key

These  are the SQL commands, I need to apply it in Rails. Kindly tell me the
syntax in Rails to apply these SQL commands instead of sql_query.

--
With Regards
Palani Kannan. K.

--
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
rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org
To unsubscribe from this group, send email to
rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org