Re: Multiple result sets with a prepared statement in mysqli

From: Date: Fri, 06 Apr 2012 19:02:31 +0000
Subject: Re: Multiple result sets with a prepared statement in mysqli
References: 1  Groups: php.db 
Request: Send a blank email to php-db+get-48254@lists.php.net to get a copy of this message
On Fri, Apr 6, 2012 at 12:33 PM, Ken Keefe <kjkeefe@illinois.edu> wrote: > I am trying to use mysqli's prepared statements to execute a stored > procedure that returns multiple result sets. I've been struggling with this > for some time now. I have created a short example test script that > demonstrates the problem. The script can be found here: > > http://pastebin.com/YZtDCNMF > > This code is how I expect mysqli to handle this scenario. However, I get a > warning on line 31 that the number of bind variables doesn't match the > number of fields in the prepared statement. This means that the second > result was not fetched by the call on line 29. > > Any help on this issue would be greatly appreciated! Also, I'm using the > packaged version of PHP that comes on Ubuntu 10.04 (5.3.2). > > Thanks, > Ken Thinking off-the-cuff here, but I'm not sure multiple selects work that way in a stored procedure. Don't stored procedures just return the last set? Maybe someone with more familiarity with them can answer.

« previous php.db (#48254) next »