shaiju davis wrote:
Hi All,
When I try to call the second Stored procedure from PHP , I get
this following error
"Commands out of sync; you can't run this
command now".
When I search I get the result as, it is because of the buffering
problem with the opened connection. Anyone know how to fix it?
I had that problem while using mysqli_multi_query on a fairly large
dataset (imdb database) not too long ago. I don't remember the exact
reason that was explained (mostly because there wasn't a very good one
given), but in the end, I found that running store_result on the result
set took care of the problem. Considering the solution, I think it's
related to buffering, as you mentioned.
$oDb->multi_query($sUpdate);
// clears the buffer
while($oDb->next_result()) {
$oDb->store_result();
}
Mark
_______________________________________________
New York PHP Community Talk Mailing List
http://lists.nyphp.org/mailman/listinfo/talk
NYPHPCon 2006 Presentations Online
http://www.nyphpcon.com
Show Your Participation in New York PHP
http://www.nyphp.org/show_participation.php