I have the following two ActiveRecord queries in an application_helper.rb file:
@left_menu = Page.select('id, menu_name').where(:published => true, :left_menu => true).order("sort")
Also can be written as:
@left_menu = Page.select('id, menu_name').where(:published => true, :left_menu => true).order("'sort' ASC")
and:
@left_menu = Page.find(:all, :conditions => {:published => true, :left_menu => true}, :order => :sort)
Why does the first one fail to sort on the 'sort' column, while the second one does not? Both work in SQLite, but only the second one works in MySQL.
Any ideas?