Frederick Cheung wrote in post #992073:
> On Apr 11, 8:11am, Ad Ber <li...@ruby-forum.com> wrote:
>> In my ruby on rails action or method Controller:
>> def print_two_table
>> @p = Pay.find_by_sql("SELECT p.id, p.topic, s.id, s.income, s.price FROM
>> pays as P LEFT OUTER JOIN suggests AS s ON s.b_id = p.b_id WHERE
>> p.created_at BETWEEN '2008-03-04' AND '2008-07-06' ")
>> end
> If you're going to do it like this (rather than using associations)
> you're going to need to alias the column names (ie select s.id as
> suggest_id)
>
> Fred

Uhm..I have already made the necessary relationships..do you have any 
idea how i can be able to display the proper id want to display?

-- 
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 rubyonrails-talk@googlegroups.com.
To unsubscribe from this group, send email to 
rubyonrails-talk+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-talk?hl=en.

Reply via email to