Re: some MDB2 questions
| From: | Lukas Smith | Date: | Thu, 17 Feb 2005 14:33:13 +0000 |
| Subject: | Re: some MDB2 questions | ||
| References: | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 | Groups: | php.pear.dev |
| Request: | Send a blank email to pear-dev+get-36243@lists.php.net to get a copy of this message | ||
Andreas Korthaus wrote:
Lukas Smith schrieb:every query calls the debug method. my example is not quite complete though. the second parameter $scope tells you what part of MDB2 issued the debug callback. For example starting and ending a transaction will also start the callback. Also I think that it may be possible for executing a prepared query to issue multiple debug callbacks in some drivers that emulate prepared queries. regards, Lukasfunction countQueries(&$db, $scope, $message) {Great! Thank you! I think autoExecute()... is also counted, right?GLOBALS['count']++;} $mdb2->setOption('debug_handler', 'countQueries'); $mdb2->setOption('debug', true); $mdb2->query(); $mdb2->query(); echo GLOBALS['count'];