php.net |  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: -
Votes:3
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
Have you experienced this issue?
Rate the importance of this bug to you:

 [2013-01-02 13:04 UTC] 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


Patches

Add a Patch

Pull Requests

Add a Pull Request

 
PHP Copyright © 2001-2019 The PHP Group
All rights reserved.
Last updated: Tue Aug 20 05:01:27 2019 UTC