Report new bug | New search | Development Roadmap Status: Open | Feedback | All

Bug #1211 Site docs for Db:tableInfo error
Submitted: 2004-04-14 18:20 UTC
From: js at nexista dot com Assigned: danielc
Status: Bogus Package: Documentation
PHP Version: Irrelevant OS:
Roadmaps: (Not assigned)    
Subscription  
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.
Password:
Status:
2004-04-20 19:58 UTC
Package:
Bug Type:
Summary:
From: js at nexista dot com
New email:
PHP Version: Package Version: OS:

 

 [2004-04-14 18:20 UTC] js at nexista dot com
Description: ------------ The docs for Db::tableInfo may be wrong. On page: http://pear.php.net/manual/en/package.database.db.intro-fetch.php at the very bottom example we have: // Once you have a valid DB object named $db... $res =& $db->query('SELECT * FROM phptest'); print_r($db->tableInfo($res)); however this does not work. You can pass a table name or call tableInfo as a method of result object but this above returned nothing on Mysql. This did: print_r($res->tableInfo());

Comments

 [2004-04-14 19:58 UTC] User who submitted this comment has not confirmed identity
If you submitted this note, check your email.If you do not have a message, click here to re-send
MANUAL CONFIRMATION IS NOT POSSIBLE.  Write a message to pear-dev@lists.php.net
to request the confirmation link.  All bugs/comments/patches associated with this

email address will be deleted within 48 hours if the account request is not confirmed!
 [2004-04-14 23:12 UTC] js at nexista dot com
I did not have latest version. Now it doesn't work at all. It still accepts a table name but passing a result object returns nothing. reverting back to old version.
 [2004-04-15 07:41 UTC] User who submitted this comment has not confirmed identity
If you submitted this note, check your email.If you do not have a message, click here to re-send
MANUAL CONFIRMATION IS NOT POSSIBLE.  Write a message to pear-dev@lists.php.net
to request the confirmation link.  All bugs/comments/patches associated with this

email address will be deleted within 48 hours if the account request is not confirmed!
 [2004-04-20 04:56 UTC] js at nexista dot com
Huh. I have mysql, php 4.3x, latest DB and no it doesn't work. It worked before so mysql is not an issue. Code: include('pear/DB.php'); $db =& DB::connect('mysql://root:@localhost/dbname'); $res =& $db->query('SELECT * FROM clients'); $row =& $res->fetchRow(); $info = $db->tableInfo($res); print_r($info); prints zilch. It works if I use an older version of DB and I can print the table info as: $info = $db->tableInfo('clients'); Are you telling me that you can get this to work on mysql with the RESULT object????? I'm checking once more before I file this as a bug. I don't believe I have misunderstood the syntax. Thanks for your time Joshua
 [2004-04-20 05:00 UTC] js at nexista dot com
Small correction in what I said. That code never worked but in older version I used $res->tableInfo() as you've probably figured out I meant. Joshua
 [2004-04-20 13:40 UTC] User who submitted this comment has not confirmed identity
If you submitted this note, check your email.If you do not have a message, click here to re-send
MANUAL CONFIRMATION IS NOT POSSIBLE.  Write a message to pear-dev@lists.php.net
to request the confirmation link.  All bugs/comments/patches associated with this

email address will be deleted within 48 hours if the account request is not confirmed!
 [2004-04-20 19:26 UTC] js at nexista dot com
I get 2 empty arrays. With older DB (v 1.1) I get an empty array on first dump and correct output on second. To be sure I went and redownloaded the latest DB (1.58) and latest PEAR (1.80) Here is my phpinfo() dump: http://ravenheartcoffee.com/php.html Do you get output on both array dumps? Joshua
 [2004-04-20 19:50 UTC] User who submitted this comment has not confirmed identity
If you submitted this note, check your email.If you do not have a message, click here to re-send
MANUAL CONFIRMATION IS NOT POSSIBLE.  Write a message to pear-dev@lists.php.net
to request the confirmation link.  All bugs/comments/patches associated with this

email address will be deleted within 48 hours if the account request is not confirmed!
 [2004-04-20 19:51 UTC] js at nexista dot com
Okay. my bad. My code was using my distro's pear instead of the files in my script - sorry to waste your time. Isn't there a way to use my own DB/PEAR without having to go and delete all the require_once...in all the files?
 [2004-04-20 19:58 UTC] User who submitted this comment has not confirmed identity
If you submitted this note, check your email.If you do not have a message, click here to re-send
MANUAL CONFIRMATION IS NOT POSSIBLE.  Write a message to pear-dev@lists.php.net
to request the confirmation link.  All bugs/comments/patches associated with this

email address will be deleted within 48 hours if the account request is not confirmed!
 [2004-05-12 13:46 UTC] pio at op dot pl
a ja mysle ze nie warto tak myslec --------------------------------------------------- http://www.nirvana-shop.com/ref.php?id=5409fdd38c18f5