[Rails] Re: Display specific field that has duplicate name to other table

2011-04-11 Thread Frederick Cheung
On Apr 11, 9:54 am, Ad Ber wrote: > Frederick Cheung wrote in post #992073: > > > On Apr 11, 8:11am, Ad Ber 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 OUT

[Rails] Re: Display specific field that has duplicate name to other table

2011-04-11 Thread Ad Ber
Frederick Cheung wrote in post #992073: > On Apr 11, 8:11am, Ad Ber 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

[Rails] Re: Display specific field that has duplicate name to other table

2011-04-11 Thread Frederick Cheung
On Apr 11, 8:11 am, Ad Ber wrote: > HI TO ALL > > I want to display a specific field in > my VIEW but they have the same FIELD name..For example, th id in the > PAYMENTS table and the id in the SUGGESTS table have the same field > name... I want to be able to display the correct PAYMENTS id and