Re: MDB2, MySQL, numRows()
| From: | Raphaël Gertz | Date: | Wed, 28 Jun 2006 22:20:41 +0000 |
| Subject: | Re: MDB2, MySQL, numRows() | ||
| References: | 1 | Groups: | php.pear.general |
| Request: | Send a blank email to pear-general+get-24508@lists.php.net to get a copy of this message | ||
> Le 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 --
>
> brian
Works 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)
Attachment: [application/pgp-signature]
Attachment: [application/pgp-signature]