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/.

--~--~---------~--~----~------------~-------~--~----~
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 [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-talk?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to