Hello again people,
I am trying to retrieve some results from my mysql db using conditions
derived from a form''s select input. I have a "room" table
with amongst
others a "rent_amount" column. The code I use to retrieve the rooms
that
where searched for based on a maximum rent amount is:
@results = Room.find(:all, :conditions => ["rent_amount = ?",
params["search[rent_amount]"]])
I also tried using the following code:
@results = Room.find(:all, :conditions => ["rent_amount = ?",
params[:search_rent_amount]])
Both of these do not come up with any results... Is there something
obvious I''m doing wrong here?
Thanks in advance,
Danny
--
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-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org
To unsubscribe from this group, send email to
rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org
For more options, visit this group at
http://groups.google.com/group/rubyonrails-talk?hl=en
-~----------~----~----~----~------~----~------~--~---