wbsurf...@yahoo.com wrote:
> Using SQL or activerecord I am not sure how to search all fields for a
> specific value ?
> I know how to do this by just writing ruby code. To do it in SQL or an
> activerecord find w/condition,
> I don't know how. I actually am supposed to combine an find w/
> condition and a search all fields for a
> value and AND those together. I think perhaps it can't be done with a
> single find ?

What you're probably looking for is a full-text search engine. Here's an 
article I found using the Sphinx engine:

http://www.neeraj.name/blog/articles/599-working-with-sphinx-fulltext-search-engine-using-ultrasphinx

If you needs are pretty basic and you don't mind a database specific 
implementation you can also look at MySQL's full-text search 
capabilities. SQL was just not designed for such queries.
-- 
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 rubyonrails-talk@googlegroups.com
To unsubscribe from this group, send email to 
rubyonrails-talk+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-talk?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to