#19108 [NEW]: DB_Result::tableInfo() docs misleading

From: Date: Mon, 26 Aug 2002 15:37:06 +0000
Subject: #19108 [NEW]: DB_Result::tableInfo() docs misleading
Groups: php.pear.dev 
Request: Send a blank email to pear-dev+get-8664@lists.php.net to get a copy of this message
From: stephan@wanderinghorse.net Operating system: n/a PHP version: 4.2.0 PHP Bug Type: PEAR related Bug description: DB_Result::tableInfo() docs misleading DB_Result::tableInfo() docs say as follows: ------------------ DB_Result::tableInfo() -- returns meta data about the result set Description mixed tableInfo (DB_Result $result [, mode $mode]) ... ------------------ That is misleading, however: it cannot be called statically. $res = $db->query( "select foo from bar" ); DB_Result::tableInfo( $res ); fails with "Fatal error: Call to a member function on a non-object in DB.php on line 828" It must be called on an object: $res = $db->query( "select * from hits where false" ); $ar = $res->tableInfo(); print_r( $ar ); -- Edit bug report at http://bugs.php.net/?id=19108&edit=1 -- Try a CVS snapshot: http://bugs.php.net/fix.php?id=19108&r=trysnapshot Fixed in CVS: http://bugs.php.net/fix.php?id=19108&r=fixedcvs Fixed in release: http://bugs.php.net/fix.php?id=19108&r=alreadyfixed Need backtrace: http://bugs.php.net/fix.php?id=19108&r=needtrace Try newer version: http://bugs.php.net/fix.php?id=19108&r=oldversion Not developer issue: http://bugs.php.net/fix.php?id=19108&r=support Expected behavior: http://bugs.php.net/fix.php?id=19108&r=notwrong Not enough info: http://bugs.php.net/fix.php?id=19108&r=notenoughinfo Submitted twice: http://bugs.php.net/fix.php?id=19108&r=submittedtwice register_globals: http://bugs.php.net/fix.php?id=19108&r=globals

« previous php.pear.dev (#8664) next »