Created
August 6, 2013 23:08
-
-
Save everdaniel/6169674 to your computer and use it in GitHub Desktop.
baseline
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
//Pull historical daily; assumes that historical has at least as many years as the generated. | |
$sql = "select * from verde_historical_daily where year <= :year"; | |
$core = Core::getInstance(); | |
$stmt = $core->dbh->prepare($sql); | |
$stmt->bindParam(':year', $totalYears, PDO::PARAM_INT); | |
try { | |
$stmt->execute() | |
while($row = $stmt->fetch(PDO::FETCH_ASSOC)){ | |
$historicalDailyYear[] = $row['year']; | |
$historicalDailyDay[] = $row['day']; | |
$historicalDailyFlow[] = $row['flow']; | |
} | |
} | |
catch (PDOException $e){ | |
echo $e->getMessage(); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment