note 76632 added to function.mysqli-stmt-execute

From: Date: Mon, 23 Jul 2007 23:14:26 +0000
Subject: note 76632 added to function.mysqli-stmt-execute
Groups: php.notes 
Request: Send a blank email to php-notes+get-128853@lists.php.net to get a copy of this message
I decided to use mysqli since I could use prepared statements for my stored procedures. To me, this is good so I don't have to worry about SQL injection by doing this. No dynamic SQL on the PHP end or in my stored procedure. Anyways, I would open one connection to the database and run multiple stored procedures. On the second stored procedure, I would get this error - lost connection - and I know that none of my queries are long running where I would hit a timeout. To me, I just care about the result set that my stored procedure is producing, which is only one result set. The rest can be safely ignored. If you are in the same boat as me, this is what you can do: After you are done getting the resultset from mysqli, do the following before you execute the next query: while(mysqli_more_results($conn)) { mysqli_next_result($conn); } ---- Server IP: 69.147.83.197 Probable Submitter: 69.133.88.166 ---- Manual Page -- http://www.php.net/manual/en/function.mysqli-stmt-execute.php Edit -- https://master.php.net/note/edit/76632 Del: integrated -- https://master.php.net/note/delete/76632/integrated Del: useless -- https://master.php.net/note/delete/76632/useless Del: bad code -- https://master.php.net/note/delete/76632/bad+code Del: spam -- https://master.php.net/note/delete/76632/spam Del: non-english -- https://master.php.net/note/delete/76632/non-english Del: in docs -- https://master.php.net/note/delete/76632/in+docs Del: other reasons-- https://master.php.net/note/delete/76632 Reject -- https://master.php.net/note/reject/76632 Search -- https://master.php.net/manage/user-notes.php

« previous php.notes (#128853) next »