Req #63884 [Opn]: Add fetching methods
Edit report at https://bugs.php.net/bug.php?id=63884&edit=1
ID: 63884
Updated by: cmb@php.net
Reported by: vincent at lycoops dot be
Summary: Add fetching methods
Status: Open
Type: Feature/Change Request
Package: MySQLi related
PHP Version: Irrelevant
Block user comment: N
Private report: N
New Comment:
Where is the problem with calling $statement->get_result(), and
fetch from the result set?
Ah, I see, this method is only implemented for mysqlnd.
Previous Comments:
------------------------------------------------------------------------
[2013-01-02 13:04:17] vincent at lycoops dot be
Description:
------------
I think it'd be great if there were a method like PDO's PDOStatement::fetch($fetch_style)
method for mysqli_statement. Passing variables by reference is not always easy, espacially if you
don't know how many fields are being selected or if you want to manipulate some fields.
I (and a lot of people) use PDO only because mysqli is missing this feature, which exists in
PDOStatement and mysqli_result.
I think the best way would be the following to be compatible with mysqli_result:
$statement->fetch_array(MYSQLI_ASSOC); (and all the other fetching methods)
Best regards
Vincent
------------------------------------------------------------------------
--
Edit this bug report at https://bugs.php.net/bug.php?id=63884&edit=1
Thread (4 messages)