index : builder | |
Archlinux32 build system | gitolite user |
summaryrefslogtreecommitdiff |
-rw-r--r-- | web-scripts/packages.php | 24 |
diff --git a/web-scripts/packages.php b/web-scripts/packages.php index 5f04979..b8b5dda 100644 --- a/web-scripts/packages.php +++ b/web-scripts/packages.php @@ -1,20 +1,20 @@ <?php -$mysql = new mysqli("localhost", "webserver", "empty"); -if ($mysql->connect_error) { - die("Connection failed: " . $mysql->connect_error); -} + $mysql = new mysqli("localhost", "http", "http"); + if ($mysql->connect_error) { + die("Connection to mysql database failed: " . $mysql->connect_error); + } -$result = $mysql -> query("SELECT * FROM buildmaster.binary_packages"); -if ($result -> num_rows > 0) { - while($row = $result->fetch_assoc()) { - foreach ($row as $key => $val) { - print $key .": ".$val." - "; + $result = $mysql -> query("SELECT * FROM buildmaster.binary_packages"); + if ($result -> num_rows > 0) { + while($row = $result->fetch_assoc()) { + foreach ($row as $key => $val) { + print $key .": ".$val." - "; + } + print "<br>\n"; } - print "<br>\n"; } -} -print 'OK'; + print 'OK'; ?> |