here''s one way:
@infos = Info.find(:all, :conditions => ["my_date between ? and ?",
params[:date1], params[:date2]])
On Mar 14, 1:30 pm, Subhadip Chakraborty <rails-mailing-l...@andreas-
s.net> wrote:> hey, i am new in ruby..i have two textbox..where i will give
> two dates.i will fire query for retriving data between two dates
> given textboxes..pleaes give me any simple code.how will i proceed?
> urgent..
> controller code:
> @result = params[:text]
> @result1 = params[:text1]
> @infos=Info.find(:all,:conditions =>
> {:user_id=>params[:text]..params[:text1]})
> but it will not worked?
> please help with code..
> --
> Posted viahttp://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
-~----------~----~----~----~------~----~------~--~---