search for: router_hostname

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

2008 Apr 08
0
Help building view to pass query to controller
...e I explained this correctly as again I am a programming newbie. Thanks in advanced for any input. Model: class Health < ActiveRecord::Base def self.sql_select_graph(hostname, start_time, end_time) connection.execute("set @c = 0") find_by_sql("select *, @c FROM healths WHERE router_hostname = ''#{hostname}'' AND created_at >= ''#{start_time}'' AND created_at <= ''#{ end_time}'' HAVING (@c:=@c+1)%12=0 ORDER BY id") end end Controller: class BandwidthController < ApplicationController @@hostname = ''cps-6-elem-2790...