search for: rateint

Displaying 1 result from an estimated 1 matches for "rateint".

Did you mean: dateint
2010 Dec 06
1
SQL codes on Controller
I use the SQL code in the controller as follow: sql = ActiveRecord::Base.connection(); @countlikes = sql.execute("SELECT COUNT(rateint) as result FROM rates"); But it returns the resuls as #<PGresult:0xb6ea00e0> in the view i.e. @countlikes = #<PGresult:0xb6ea00e0> I wanted the integer value. I am wondering how to use sql codes in the controller -- You received this message because you are subscribed to the G...