[Phphtmllib-devel] SF.net SVN: phphtmllib:[3274] trunk/open2300/lib/modules/graphs/gauge/ myRainFla
Status: Beta
Brought to you by:
hemna
From: <he...@us...> - 2009-10-15 04:24:32
|
Revision: 3274 http://phphtmllib.svn.sourceforge.net/phphtmllib/?rev=3274&view=rev Author: hemna Date: 2009-10-15 04:24:24 +0000 (Thu, 15 Oct 2009) Log Message: ----------- update total Modified Paths: -------------- trunk/open2300/lib/modules/graphs/gauge/myRainFlashGauge.php Modified: trunk/open2300/lib/modules/graphs/gauge/myRainFlashGauge.php =================================================================== --- trunk/open2300/lib/modules/graphs/gauge/myRainFlashGauge.php 2009-10-14 16:39:58 UTC (rev 3273) +++ trunk/open2300/lib/modules/graphs/gauge/myRainFlashGauge.php 2009-10-15 04:24:24 UTC (rev 3274) @@ -59,7 +59,15 @@ case "total": $this->rain_amount = $current_do->get_rain_total(); - $this->desc = "Y E A R R A I N"; + $this->desc = "Y E A R R A I N"; + $db = open2300DB::singleton(); + + $year = date("Y"); + + $stmt = $db->queryBindOneRowCache("Select rain_total from weather where datetime like :date order by datetime asc limit 0,1", + array(":date" => $year.'%')); + $year_rain_start = $stmt->rain_total; + $this->rain_amount = sprintf("%0.2f", $current_do->get_rain_total() - $year_rain_start); break; } } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |