[Phphtmllib-devel] SF.net SVN: phphtmllib:[3240] trunk/open2300/lib/modules/home/widgets/ CurrentCo
Status: Beta
Brought to you by:
hemna
From: <he...@us...> - 2009-03-04 03:42:46
|
Revision: 3240 http://phphtmllib.svn.sourceforge.net/phphtmllib/?rev=3240&view=rev Author: hemna Date: 2009-03-04 03:42:44 +0000 (Wed, 04 Mar 2009) Log Message: ----------- for some reason bind var only works once Modified Paths: -------------- trunk/open2300/lib/modules/home/widgets/CurrentConditions.inc Modified: trunk/open2300/lib/modules/home/widgets/CurrentConditions.inc =================================================================== --- trunk/open2300/lib/modules/home/widgets/CurrentConditions.inc 2009-03-03 19:12:43 UTC (rev 3239) +++ trunk/open2300/lib/modules/home/widgets/CurrentConditions.inc 2009-03-04 03:42:44 UTC (rev 3240) @@ -53,14 +53,19 @@ $this->rain_total = sprintf("%0.2f", $this->wx->get_rain_total() - $year_rain_start); //get the peak winds - $stmt = $db->queryBindOneRowCache("select datetime,wind_speed, wind_angle, wind_direction from weather where ". - "wind_speed = (select max(wind_speed) from weather where datetime like :date) ". - "and datetime like :date", - array(":date" => $today.'%')); - $this->peak_wind['speed'] = $stmt->wind_speed; - $this->peak_wind['angle'] = $stmt->wind_angle; - $this->peak_wind['direction'] = $stmt->wind_direction; - $this->peak_wind['time'] = $stmt->datetime; + //$db->set_debug_flag(true); + $sql = "select datetime,wind_speed, wind_angle, wind_direction from weather where ". + "wind_speed = (select max(wind_speed) from weather where datetime like :date) ". + "and datetime like :date2"; + $stmt = $db->queryBindOneRow($sql, + array(":date" => $today.'%', + ":date2" => $today.'%')); + $log->debug(var_export($stmt,true)); + $this->peak_wind['speed'] = $stmt->wind_speed; + $this->peak_wind['angle'] = $stmt->wind_angle; + $this->peak_wind['direction'] = $stmt->wind_direction; + $this->peak_wind['time'] = $stmt->datetime; + $log->debug("peak wind was ".$stmt->wind_speed); } public function get_content() { This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |