这是我试图在 rails 中使用的 activerecord 查询
q = "Manchester"
b = "John Smith"
Model.find(:all, :conditions => ["city ? AND name like ?", q, b])
但我在 Rails 控制台中收到此错误
ActiveRecord::StatementInvalid: SQLite3::SQLException: near "'Manchester'": 语法错误: SELECT "model".* FROM "model" WHERE (city 'Manchester' AND name like 'John Smith')
请帮忙!