Displaying 1 result from an estimated 1 matches for "thermo_loc".
2008 Jun 23
1
Find_by_sql Doesn't Return Attributes?
My find_by_sql is not returning attributes of the calling model class.
Thermo.find_by_sql("SELECT COUNT(*) FROM thermo WHERE thermo_loc =
''back'' GROUP BY DAYOFWEEK(time_on) ASC")
# ==> [#<Thermo >, #<Thermo >, #<Thermo >, #<Thermo >, #<Thermo >,
#<Thermo >, #<Thermo >]
The sql is fine and when I checked it in a mysql console, it returns
the day of the week and co...