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