Re: MDB2, MySQL, numRows()
| From: | brian | Date: | Wed, 28 Jun 2006 22:53:34 +0000 |
| Subject: | Re: MDB2, MySQL, numRows() | ||
| References: | 1 2 | Groups: | php.pear.general |
| Request: | Send a blank email to pear-general+get-24509@lists.php.net to get a copy of this message | ||
Raphaël Gertz wrote:
Yes, i have this right after connection: $mdb2->loadModule('Extended'); I didn't mention it because i don't think numRows() is part of the extended module. I can confirm that extended /does/ work though, as i've used other parts of it with no problems. All of my PEAR packages are up to date, as well. PEAR 1.4.9 MDB2 2.1.0 MDB2_Driver_mysql 1.1.0 brianLe mercredi 28 juin 2006 23:57, brian a écrit : numRows: method not implemented[Native code: 0] [Native message: ] Is this true? Or am i doing this wrong? -- snip -- $sql = 'SELECT * FROM foo WHERE bar = ?'; $stmnt = $mdb2->prepare($sql, Array('integer'), MDB2_PREPARE_RESULT); $result = $stmnt->execute($baz); if (PEAR::isError($result)) { die('bad result'); } else { $out = $result->numRows(); die($out->getUserinfo()); } -- snip -- brianWorks fine on my box (getOne/getAll), are you sure to have the latest version ? (older simply don't works here) Did you think to load the Extension ? $mdb2->loadModule('Extended'); before using the numRow function ? (this is somewhere in the doc, and should be shown in the example, I didn't get time to bug report it against doc)