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

From: Date: Tue, 27 Aug 2002 08:10:56 +0000
Subject: #19108 [Csd]: DB_Result::tableInfo() docs misleading
References: 1  Groups: php.pear.dev 
Request: Send a blank email to pear-dev+get-8679@lists.php.net to get a copy of this message
ID: 19108 User updated by: stephan@wanderinghorse.net Reported By: stephan@wanderinghorse.net Status: Closed Bug Type: PEAR related Operating System: n/a PHP Version: 4.2.0 New Comment: Correct, it doesn't indicate static behaviour, but it does say that it accepts a DB_Result object as it's first parameter, and that's not the case. i checked out the draft link below but could not find DB_Result::tableInfo() in the list (http://www-user.tu-chemnitz.de/~meal/php/peardoc2/package.database.html). Previous Comments: ------------------------------------------------------------------------ [2002-08-27 03:18:56] alexmerz@php.net Every entry headline is written as Package::Function. It does not indicate any static behavior. Peardoc 2 will clearifed this. See Draft on http://www-user.tu-chemnitz.de/~meal/php/peardoc2/ ------------------------------------------------------------------------ [2002-08-26 11:37:05] stephan@wanderinghorse.net 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 this bug report at http://bugs.php.net/?id=19108&edit=1

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