In reference to what lachlan76 said before, stored procedures CAN be executed through prepared statements as long as you tell the DB to move to the next result before executing again.
Example (Five calls to a stored procedure):
<?php
for ($i=0;$i<5;$i++) {
$statement = $mysqli->stmt_init();
$statement->prepare("CALL some_procedure( ? )");
$statement->bind_param("i", 1);
$statement->execute();
$statement->bind_result($results);
while($statement->fetch()) {
}
$statement->close();
while($mysqli->next_result()) { }
}
?>
If you include the last statement, this code should execute without the nasty "Commands out of sync" error.