Hi,
I am writing this code in purpose that i can i select image from the
picture table and i want to get all the user so i can loop through
user1 , user2 ....
and display the pic on bowers..
def show_image
@id = User.find(:all, :select => 'user.id')
for id in @id
@image = ActiveRecord::Base.connection.select_value('select
image from Picture pic
inner join Cultures c on pic.culture_id = c.id
inner join user pt on pt.id = p.user
where pt.id = "id"');
end
send_data @image, :type => 'image/png', :disposition => 'inline'
end
and i get an error "(SQLite3::SQLException: ambiguous column name: id:
"
Please help and give me some advices.. Big thanks for all
--
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.