diff options
Diffstat (limited to 'tests/httpd-php-mysql-sanity-test/new_mysql.php')
-rw-r--r-- | tests/httpd-php-mysql-sanity-test/new_mysql.php | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/tests/httpd-php-mysql-sanity-test/new_mysql.php b/tests/httpd-php-mysql-sanity-test/new_mysql.php new file mode 100644 index 0000000..6087b11 --- /dev/null +++ b/tests/httpd-php-mysql-sanity-test/new_mysql.php @@ -0,0 +1,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']); +?> |