I’m having the strangest problem…
I’m getting syntax errors on this find…
@lob_messages = ProviderMessage.find(:all,
:conditions => [ “to = ?”, “GFA”],
:order => ‘created_at DESC’,
:limit => 5)
The Exception Rails is returning is:
Mysql::Error: #42000You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'to = 'GFA') ORDER BY created_at DESC LIMIT 5' at line 1: SELECT * FROM provider_messages WHERE (to = 'GFA') ORDER BY created_at DESC LIMIT 5
I really would appreciate another set of eyeballs. Anybody see anything wrong with the find?
And I can't get a find with :conditions => [ "something IN (?)", some_array] to work either.
Any assistance would really be appreciated!