Package home | Report new bug | New search | Development Roadmap Status: Open | Feedback | All | Closed Since Version 1.5.0b4

Bug #8925 method tableinfo fails
Submitted: 2006-10-10 08:50 UTC
From: kai at medienpartner dot de Assigned: lsmith
Status: Closed Package: MDB2_Driver_mysqli (version 1.2.2)
PHP Version: 5.1.2 OS: Ubuntu 6.06.1
Roadmaps: (Not assigned)    
Subscription  
Comments Add Comment Add patch


Anyone can comment on a bug. Have a simpler test case? Does it work for you on a different platform? Let us know! Just going to say 'Me too!'? Don't clutter the database with that please !
Your email address:
MUST BE VALID
Solve the problem : 49 - 47 = ?

 
 [2006-10-10 08:50 UTC] kai at medienpartner dot de (Kai)
Description: ------------ The script works with the 'mysql' driver but not with 'mysqli'. Test script: --------------- // run the query and get a result handler $query = 'SELECT * FROM user'; $result = $mdb2->query($query); $mdb2->loadModule('Reverse', null, true); echo 'tableInfo:<br>'; var_dump($mdb2->reverse->tableInfo($result)).'<br />'; Expected result: ---------------- The table info. Actual result: -------------- MDB2_Error Object ( [error_message_prefix] => [mode] => 1 [level] => 1024 [code] => -20 [message] => MDB2 Error: insufficient data supplied [userinfo] => tableInfo: [Error message: Could not generate result ressource] [Last query: SELECT * FROM user]

Comments

 [2006-10-11 13:22 UTC] lsmith (Lukas Smith)
You must change is_resource() to is_object() inside the tableInfo() method. I will commit this fix once I am back home on the weekend.
 [2006-10-14 13:41 UTC] lsmith (Lukas Smith)
This bug has been fixed in CVS. If this was a documentation problem, the fix will appear on pear.php.net by the end of next Sunday (CET). If this was a problem with the pear.php.net website, the change should be live shortly. Otherwise, the fix will appear in the package's next release. Thank you for the report and for helping us make PEAR better.