Displaying 2 results from an estimated 2 matches for "end_intake_d".
2006 Feb 09
17
complicated finds are eating my sole
I abandoned ruby way for find_by_sql and still can''t get this...
@myplacement = Placement.find_by_sql(
"select * from placement where
:intake_date >= beg_intake_date
and
:intake_date <= end_intake_date")
just a simple date range...it''s killing me - If I knew how to load
placement controller into irb, I could probably try out finds
interactive mode...
Thanks
Craig
2006 Feb 19
8
building multiple find conditions
...39; but to allow for simply a
single set of find criteria.
controller code...
@vw_string = @vw_string1 = @vw_string2 = @vw_string3 = []
if params[:beg_intake_date] != "" then
@vw_string1 = ["intake_date between ? and ?",
params[:beg_intake_date], params[:end_intake_date] ]
end
if params[:beg_referral_date] != "" then
@vw_string2 = ["referral_date between ? and ?",
params[:beg_referral_date], params[:end_referral_date] ]
end
if params[:beg_discharge_date] != "" then
@vw_string3 = [&q...