On 8 Oct 2008, at 13:44, fx3000se wrote:
> > ScheduleItem.count(["id = ?", 204]) > used to work as expected in Rails 1.1.6, i.e. returning the count of > rows where id = 204 ... > In 2.1.1 I get the error: > > "ActiveRecord::StatementInvalid: ActiveRecord::ActiveRecordError: 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 '?204) AS > count_id_204 FROM `schedule_items`' at line 1: SELECT count(id = ?204) > AS count_id_204 FROM `schedule_items` " > > Looks like ["id = ?", id] is not evaluated/resolved correctly > resulting in 'id = ?204' instead of 'id = 204' > > Bug? > Nope, it changed. This was deprecated in rails 1.2 and removed in 2.0 Fred > --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---

