So i am trying to do this
Order.find :all, :conditions => "org = 'test org'"
what ends up firing is
SELECT * FROM `orders` WHERE (org = 'test org')
the whitespace in the argument gets stripped. what am i missing.. im really stumped here. please help!
First turn on the general query log in MySQL and see whether the query, as received and executed by MySQL itself, is correct.
This is because Rails will squeeze all duplicate whitespace from its own query logs (when running in development mode):
If the query sent to MySQL, according to the MySql query log itself, is still incorrect, try again with: