xref: /PHP-8.1/ext/mysqli/tests/049.phpt (revision b5a14e6c)
1--TEST--
2mysql_fetch_row (OO-Style)
3--EXTENSIONS--
4mysqli
5--SKIPIF--
6<?php
7require_once('skipifconnectfailure.inc');
8?>
9--FILE--
10<?php
11    require_once("connect.inc");
12
13    /*** test mysqli_connect 127.0.0.1 ***/
14    $mysql = my_mysqli_connect($host, $user, $passwd, $db, $port, $socket);
15
16    $mysql->select_db($db);
17    $result = $mysql->query("SELECT DATABASE()");
18    $row = $result->fetch_row();
19    $result->close();
20
21    var_dump($row);
22    if ($row[0] != $db)
23        printf("[001] Expecting '%s' got '%s'\n", $db, $row[0]);
24
25    $mysql->close();
26    print "done!";
27?>
28--EXPECTF--
29array(1) {
30  [0]=>
31  string(%d) "%s"
32}
33done!
34