Home > Archive > PHP Pear > June 2006 > MDB2, MySQL, numRows()
You are viewing an archived Text-only version of the thread.
To view this thread in it's original format and/or if you want to reply to
this thread please [click here]
| Author |
MDB2, MySQL, numRows()
|
|
|
| PEAR 1.4.9
MDB2 2.1.0
MDB2_Driver_mysql 1.1.0
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
| |
| Lukas Smith 2006-06-29, 3:59 am |
| brian wrote:
> PEAR 1.4.9
> MDB2 2.1.0
> MDB2_Driver_mysql 1.1.0
>
> numRows: method not implemented[Native code: 0] [Native message: ]
>
> Is this true? Or am i doing this wrong?
I presume you set the "result_buffering" option to false?
Without result buffering MDB2 cannot know how many rows there are in the
result set.
regards,
Lukas
| |
|
| Lukas Smith wrote:
> brian wrote:
>
>
>
> I presume you set the "result_buffering" option to false?
> Without result buffering MDB2 cannot know how many rows there are in the
> result set.
>
It looks as if that was precisely the problem. Seems obvious now, of
course. Thanks a bunch, Lukas.
brian
|
|
|
|
|