Hi

I use mongoid for rails application
and I try to do
@users = User.where("first_name = ? OR last_name = ? OR type = ?",
firstname, lastname, usertype)

but I am getting error
but when i put:
@users = User.where(:first_name => firstname, :last_name => lastname,
:type => usertype).all

the program run successfully
but i need OR to execute in mongodb
Also I need sql LIKE to execute in mongodb

I have learned the raw code of mongodb
but I need a help for Rails query

Could anyone help me ?
Thanks in Advance

Kausik

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