|  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Request #63884 Add fetching methods
Submitted: 2013-01-02 13:04 UTC Modified: 2021-04-07 12:03 UTC
Avg. Score:4.7 ± 0.5
Reproduced:2 of 2 (100.0%)
Same Version:1 (50.0%)
Same OS:1 (50.0%)
From: vincent at lycoops dot be Assigned:
Status: Open Package: MySQLi related
PHP Version: Irrelevant OS:
Private report: No CVE-ID: None
Welcome back! If you're the original bug submitter, here's where you can edit the bug or add additional notes.
If this is not your bug, you can add a comment by following this link.
If this is your bug, but you forgot your password, you can retrieve your password here.
Bug Type:
From: vincent at lycoops dot be
New email:
PHP Version: OS:


 [2013-01-02 13:04 UTC] vincent at lycoops dot be
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


Add a Patch

Pull Requests

Add a Pull Request


AllCommentsChangesGit/SVN commitsRelated reports
 [2021-04-07 12:03 UTC]
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.
PHP Copyright © 2001-2021 The PHP Group
All rights reserved.
Last updated: Sat Nov 27 06:03:14 2021 UTC