L
Luigi Maresca
Hi,
I need to build these conditions to find items in the DB:
cond_selection = { }
cond_selection[ublic]=true
(cond_selection[:license_id]=1 OR cond_selection[:license_id]=3)
@guides=Guide.findall,rder=>'title',:conditions=>cond_selection)
------------
In other words, I need to collect all the items that have license_id=1
OR license_id=3.
This string:
cond_selection[:license_id]=1 OR cond_selection[:license_id]=3
doesn't work!
How can I do?
Thank you very much!
Luigi
I need to build these conditions to find items in the DB:
cond_selection = { }
cond_selection[ublic]=true
(cond_selection[:license_id]=1 OR cond_selection[:license_id]=3)
@guides=Guide.findall,rder=>'title',:conditions=>cond_selection)
------------
In other words, I need to collect all the items that have license_id=1
OR license_id=3.
This string:
cond_selection[:license_id]=1 OR cond_selection[:license_id]=3
doesn't work!
How can I do?
Thank you very much!
Luigi