Lines Matching refs:stmt
19 $stmt = @new mysqli_stmt($link);
25 $stmt = mysqli_stmt_init($link);
26 if (NULL !== ($tmp = @mysqli_stmt_insert_id($stmt)))
29 if (!mysqli_stmt_prepare($stmt, "SELECT id, label FROM test ORDER BY id LIMIT 1") ||
30 !mysqli_stmt_execute($stmt)) {
31 printf("[004] [%d] %s\n", mysqli_stmt_errno($stmt), mysqli_stmt_error($stmt));
34 if (0 !== ($tmp = mysqli_stmt_insert_id($stmt)))
36 mysqli_stmt_close($stmt);
39 $stmt = mysqli_stmt_init($link);
40 if (!mysqli_stmt_prepare($stmt, "INSERT INTO test(id, label) VALUES (100, 'a')") ||
41 !mysqli_stmt_execute($stmt)) {
42 printf("[006] [%d] %s\n", mysqli_stmt_errno($stmt), mysqli_stmt_error($stmt));
45 if (0 !== ($tmp = mysqli_stmt_insert_id($stmt)))
49 (!mysqli_stmt_prepare($stmt, "ALTER TABLE test MODIFY id INT NOT NULL AUTO_INCREMENT") ||
50 !mysqli_stmt_execute($stmt))) {
51 printf("[008] [%d] %s\n", mysqli_stmt_errno($stmt), mysqli_stmt_error($stmt));
56 if (!mysqli_stmt_prepare($stmt, "INSERT INTO test(label) VALUES ('a')") ||
57 !mysqli_stmt_execute($stmt)) {
58 printf("[009] [%d] %s\n", mysqli_stmt_errno($stmt), mysqli_stmt_error($stmt));
60 if (0 === ($tmp = mysqli_stmt_insert_id($stmt)))
62 mysqli_stmt_close($stmt);
66 var_dump(mysqli_stmt_insert_id($stmt));