I would very much be able to do this query with ActiveRecord:

    SELECT `phones`.* FROM `phones` WHERE (ddd, number) in 
((31,32310512),(31,96438112))

Unfortunately, ActiveRecord gives me no way to do so with a prepared 
statement. The intuitive way to do it would be:

    Phone.where('(ddd, number) in (?)',  [[31,32310512],[31,96438112]])

that does not work, as it yields:

SELECT `phones`.* FROM `phones`  WHERE ((ddd, number) in ('---\n- 31\n- 
32310512\n','---\n- 31\n- 96438112\n'))

-- 
You received this message because you are subscribed to the Google Groups "Ruby 
on Rails: Core" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/rubyonrails-core?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.


Reply via email to