Re: MDB2 Error: Array

From: Date: Sun, 01 Oct 2006 12:33:10 +0000
Subject: Re: MDB2 Error: Array
References: 1 2 3  Groups: php.pear.general 
Request: Send a blank email to pear-general+get-25322@lists.php.net to get a copy of this message
Wing Pui Ma wrote:
Sometime it print out the "finish", sometime it print out the error message "MDB2 Error: Array". I really don't know why? Is the peal have a problem? It is just a simple "list" procedure! If use pear to run more procedures, error will happen more!
As far as I know the issue is that MySQL returns multiple result sets for a single routine call. Ignoring this fact can break your connection. What you need to do is enable the "multi_query" option and then iterate over the result sets using the nextResult() method. if you do not want to handle setting the "multi_query" option yourself you can use the execStoredProc() method of the functions module. This bug report might give you some additional information: http://pear.php.net/bugs/bug.php?id=8426 Finally please also check the outout from $error->getUserinfo() and not only $error->getMessage().
Hello Lukas, I tried to access pear.php.net but unsuccessful!
yes the site is down atm.
How can I use multi_query or execStoredProc() method in the following code?? I tried to replace query($sql) to execStoredProc($sql), but got an error! :(
the method works slightly different. $mdb2->loadModule('Function'); $mdb2->function->execStoredProc($routine_name_string, $parameters_array); regards, Lukas

« previous php.pear.general (#25322) next »