2 require_once("connect.inc");
4 if (!$link = my_mysqli_connect($host, $user, $passwd, $db, $port, $socket)) {
5 printf("[001] Connect failed, [%d] %s\n", mysqli_connect_errno(), mysqli_connect_error());
7 if (FALSE === ($stmt = $link->prepare('SELECT 42'))) {
8 printf("[002] Prepare failed, [%d] %s\n", mysqli_errno($link), mysqli_error($link));
10 if (FALSE === $stmt->execute()) {
11 printf("[003] Execute failed, [%d] %s\n", $stmt->errorno
, $stmt->error
);
13 if (FALSE === $stmt->store_result()) {
14 printf("[004] store_result failed, [%d] %s\n", $stmt->errorno
, $stmt->error
);
17 if (FALSE === $stmt->bind_result($one)) {
18 printf("[005] bind_result failed, [%d] %s\n", $stmt->errorno
, $stmt->error
);
20 if (FALSE === $stmt->reset()) {
21 printf("[006] bind_result failed, [%d] %s\n", $stmt->errorno
, $stmt->error
);
23 while ($stmt->fetch()) {