}
if (!mysqli_stmt_execute($stmt)) {
    printf("[027] [%d] %s\n", mysqli_stmt_errno($stmt), mysqli_stmt_error($stmt));
}
mysqli_stmt_close($stmt);
if (!mysqli_real_query($link, 'SELECT label, id FROM test')) {
    printf("[028] [%d] %s\n", mysqli_errno($link), mysqli_error($link));
}
if (!($res = mysqli_use_result($link))) {
    printf("[029] [%d] %s\n", mysqli_errno($link), mysqli_error($link));
}
mysqli_free_result($res);
if (!mysqli_real_query($link, 'SELECT label, id FROM test')) {
    printf("[030]  [%d] %s\n", mysqli_errno($link), mysqli_error($link));
}
if (!($res = mysqli_store_result($link))) {
    printf("[031]  [%d] %s\n", mysqli_errno($link), mysqli_error($link));
}
mysqli_free_result($res);
if (!($stmt = mysqli_prepare($link, 'SELECT id * 3 FROM test'))) {
    printf("[032] [%d] %s\n", mysqli_errno($link), mysqli_error($link));
} else {
    mysqli_stmt_close($stmt);
}
if (!mysqli_query($link, "INSERT INTO test(id, label) VALUES (100, 'z')", MYSQLI_USE_RESULT) || !mysqli_query($link, 'DELETE FROM test WHERE id > 50', MYSQLI_USE_RESULT)) {
    printf("[033] [%d] %s\n", mysqli_errno($link), mysqli_error($link));
}
$tmp = mysqli_thread_safe($link);
$tmp = mysqli_thread_id($link);
mysqli_close($link);
print "done!";
Beispiel #2
0
<?php

if (!is_bool($tmp = mysqli_thread_safe())) {
    printf("[001] Expecting boolean/any, got %s/%s.\n", gettype($tmp), $tmp);
}
print "done!";