I am a newbie, so excuse me if this is a lame question -
I am writing a query -
Airport.find(:all, :conditions =>[“owner_city_state_zip like ‘%?%’”,
Now, this gives an error -
Mysql::Error: You have an error in your SQL syntax; check the manual
that corresponds to your MySQL server version for the right syntax to
use near ‘97103’%’)’ at line 1: SELECT * FROM airports WHERE
(owner_city_state_zip like ‘%‘97103’%’)
How do I format my query to get rid of this problem?
Also, how do we write a query to written say, 2 fields out of table
of all the fields.
Add: 1314 Spring Street, #412
Seattle, WA 98104