[Phphtmllib-devel] SF.net SVN: phphtmllib:[3238] trunk/open2300/lib/modules/home/widgets/ CurrentCo
Status: Beta
Brought to you by:
hemna
From: <he...@us...> - 2009-03-03 19:11:00
|
Revision: 3238 http://phphtmllib.svn.sourceforge.net/phphtmllib/?rev=3238&view=rev Author: hemna Date: 2009-03-03 19:10:54 +0000 (Tue, 03 Mar 2009) Log Message: ----------- fix sql 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 18:49:46 UTC (rev 3237) +++ trunk/open2300/lib/modules/home/widgets/CurrentConditions.inc 2009-03-03 19:10:54 UTC (rev 3238) @@ -53,9 +53,11 @@ $this->rain_total = sprintf("%0.2f", $this->wx->get_rain_total() - $year_rain_start); //get the peak winds - $stmt = $db->queryBindOneRowCache("select datetime,max(wind_speed) as max_wind, wind_angle, wind_direction from weather where datetime like :date", + $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) ". + "datetime like :date", array(":date" => $today.'%')); - $this->peak_wind['speed'] = $stmt->max_wind; + $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; This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |