I’d like to search a database through n terms for something like:
(category.name, subcategory.name) LIKE TERM1 AND
(category.name, subcategory.name) LIKE TERM2 AND
(category.name, subcategory.name) LIKE TERM3 …
A category has many subcategories and a subcategory has one category.
I suppose I could iterate through the results and check for the terms in
each field but that seems…well…ugly.
This seems more complicated than a typical case, but does ActiveRecord
support something like this out of the box?
OT: If not, is there an SQL search that will give the result I’m
I’m hoping to stick with MySQL but would consider other *nix DBMS to get