ConFoo Montreal 2026: Call for Papers

Voting

: max(nine, four)?
(Example: nine)

The Note You're Voting On

lachlan76 at gmail dot com
18 years ago
Do not try to use a stored procedure through a prepared statement.

Example:

<?php
$statement
= $mysqli->stmt_init();
$statement->prepare("CALL some_procedure()");
?>

If you attempt to do this, it will fail by dropping the connection during the next query. Use mysqli_multi_query instead.

Example:

<?php
$mysqli
->multi_query("CALL some_procedure()");
do
{
$result = $mysqli->store_result();

// Do your processing work here

$result->free();
} while(
$mysqli->next_result());
?>

This means that you cannot bind parameters or results, however.

<< Back to user notes page

To Top