Created
January 2, 2014 12:03
-
-
Save anonymous/8218272 to your computer and use it in GitHub Desktop.
This file contains hidden or 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
$myServer = "trolololol"; | |
$myUser = "yeah"; | |
$myPass = "MMMMM hmm"; | |
$myDB = "WOOT!"; | |
$date = array(); | |
$storage = array(); | |
// Connect to the MySQL Database | |
$mydbhandle = mysqli_connect($myServer, $myUser, $myPass, $myDB) or die("Couldn't connect to MySQL Server on $myServer"); | |
//Pull the data for the graph from MySQL | |
$query = 'SELECT DATE, SUM( Commited ) FROM StorageUsedByVm GROUP BY DATE'; | |
$results = mysqli_query($mydbhandle,$query); | |
while($row = mysqli_fetch_array($results)) | |
{ | |
$date = $row["DATE"]; | |
$storage = $row["SUM( Commited )"]; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment