On Mon, Jul 18, 2011 at 3:04 PM, Aegorov Egorov <[email protected]> wrote:
> SQLite3::SQLException: near "to": syntax error: SELECT COUNT(*) FROM
> "likes" WHERE ("likes".to = 1)
> in sqlite console sql query working with this syntax
> SELECT COUNT(*) FROM "likes" WHERE ("likes"."to" = 1)
Apparently the SQLite3 adapter isn't quoting that field name, and
unfortunately for you, "TO" is a SQL reserved word.
The best solution would be to change that. :-)
HTH,
--
Hassan Schroeder ------------------------ [email protected]
http://about.me/hassanschroeder
twitter: @hassan
--
You received this message because you are subscribed to the Google Groups "Ruby
on Rails: Talk" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/rubyonrails-talk?hl=en.