Re: MDB2 Error: Array
| From: | Lukas Kahwe Smith | 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:
yes the site is down atm.Hello Lukas, I tried to access pear.php.net but unsuccessful!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().
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