Search criteria
1.Searching with the combination of the "AND" and "OR"
conditions for
four to five fields of the table.
-Added the indexes for the search fields.
Ex1. Order.search(:conditions=>["store_id=16 and
(store_order_id=''23432'' or
store_customer_id=''23432'')" ])
-This query is returning the empty result set.
Ex2.
Order.search(:conditions=>{:store_id=>16,:store_order_id=>"23432",:store_customer_id=>"23432"})
-This query works perfectly,but this is a combination of the "AND"
condition.
Trying to find a solution to search on the multiple fields combined with
"AND" and "OR" conditions.
Regards,
Raghu
--
Posted via http://www.ruby-forum.com/.