Displaying 1 result from an estimated 1 matches for "bottominfo".
2005 Aug 19
3
accessing DB result in template
hello,
I have the following in my controller
def totalmembers
@total = User.find_by_sql "SELECT COUNT(*) as count FROM users "
end
now inside my template how do i access the field "count" from the
query so i can print out the number of members ?
I tried everythign like <%= @total.count %> but nothing works.
thanks
adam