|  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Request #39847 mysqli_fetch_[field|fields|field_direct] need to return db
Submitted: 2006-12-15 19:51 UTC Modified: 2011-01-17 12:23 UTC
Avg. Score:4.5 ± 0.5
Reproduced:2 of 2 (100.0%)
Same Version:1 (50.0%)
Same OS:1 (50.0%)
From: marzillo at emdeon dot com Assigned: kalle (profile)
Status: Closed Package: MySQLi related
PHP Version: 5.2.0 OS: *
Private report: No CVE-ID: None
View Add Comment Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
You can add a comment by following this link or if you reported this bug, you can edit this bug over here.
Block user comment
Status: Assign to:
Bug Type:
From: marzillo at emdeon dot com
New email:
PHP Version: OS:


 [2006-12-15 19:51 UTC] marzillo at emdeon dot com
The mysqli functions fetch_field, fetch_fields and fetch_field_direct do not return the db name when the C API allows it.  For the past several versions I have been adding the following code to mysqli_api.c to include this field.  Could this be included in future releases?

mysqli_fetch_field function
add_property_string(return_value, "db",(field->db ? field->db : ""), 1);

mysqli_fetch_fields function
add_property_string(obj, "db",(field->db ? field->db : ""), 1);

add_property_string(return_value, "db",(field->db ? field->db : ""), 1);


Add a Patch

Pull Requests

Add a Pull Request


AllCommentsChangesGit/SVN commitsRelated reports
 [2011-01-01 23:46 UTC]
-Package: Feature/Change Request +Package: MySQLi related
 [2011-01-01 23:47 UTC]
-Summary: mysqli_fetch_field/_fetch_fields/_fetch_field_direct need to return db +Summary: mysqli_fetch_[field|fields|field_direct] need to return db -Operating System: Linux +Operating System: *
 [2011-01-06 14:53 UTC]
-Assigned To: +Assigned To: mysql
 [2011-01-06 14:53 UTC]
Andrey? Sounds like a valid request... let's do....
 [2011-01-07 19:25 UTC]
Automatic comment from SVN on behalf of kalle
Log: Implemented FR #39847 (mysqli_fetch_[field|fields|field_direct] need to return db)
 [2011-01-07 19:29 UTC]
-Assigned To: mysql +Assigned To: kalle
 [2011-01-07 19:29 UTC]
I implemented this in trunk for mysqli, keeping this open until its decided whether this should be merged to 5.3
 [2011-01-17 12:20 UTC]
Automatic comment from SVN on behalf of kalle
Log: MFT: Added 'db' and 'catalog' keys to the field fetching functions (FR #39847)
 [2011-01-17 12:22 UTC]
-Status: Assigned +Status: Closed
 [2011-01-17 12:22 UTC]
This will appear in PHP 5.3.6 :)
 [2011-01-17 12:23 UTC]
Forgot to mention, 'catalog' will also be available along with 'db'
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Sun Apr 14 10:01:29 2024 UTC