summaryrefslogtreecommitdiffstats
path: root/tests/httpd-php-mysql-sanity-test/new_mysql.php
blob: 6087b11483179cb6c15a89e4ce495effc0ee4d4d (plain)
1
2
3
4
5
6
7
8
9
10
11
12
<?php
$db = mysqli_connect("localhost", "root");
if (!$db) {
    die("Could not connect");
}
if (!mysqli_select_db($db, "php_mysql_test")) {
    die("Could not select database");
}
$res = mysqli_query($db, "SELECT * from foobar");
$row = mysqli_fetch_assoc($res);
printf("%s is %d\n", $row['name'], $row['value']);
?>