note 80426 modified in function.mysqli-stmt-prepare by danbrown

From: Date: Fri, 28 Nov 2008 22:49:36 +0000
Subject: note 80426 modified in function.mysqli-stmt-prepare by danbrown
References: 1  Groups: php.notes 
Request: Send a blank email to php-notes+get-147385@lists.php.net to get a copy of this message
i've got some bad news for you guys if you haven't found out already. the trick with mysqli_next_result() only prevents having the connection dropped after a stored procedure call. apparently you can bind parameters for a prepared stored procedure call, but you'll get messed up records from mysqli_stmt_fetch() after mysqli_stmt_bind_result(), at least when the stored procedure itself contains a prepared statement. a way to avoid data corruption could be specifying the CLIENT_MULTI_STATEMENTS flag in mysqli_real_connect(), if it wasn't disabled entirely (for security reasons, as they say). another option is to use mysqli_multi_query(), but then you can't bind at all. --was-- i've got some bad news for you guys if you haven't found out already. the trick with mysqli_next_result() only prevents having the connection dropped after a stored procedure call. apparently you can bind parameters for a prepared stored procedure call, but you'll get messed up records from mysqli_stmt_fetch() after mysqli_stmt_bind_result(), at least when the stored procedure itself contains a prepared statement. a way to avoid data corruption could be specifying the CLIENT_MULTI_STATEMENTS flag in mysqli_real_connect(), if it wasn't disabled entirely (for security reasons, as they say). another option is to use mysqli_multi_query(), but then you can't bind at all. http://php.net/manual/en/function.mysqli-stmt-prepare.php

« previous php.notes (#147385) next »