#19108 [Opn->Csd]: DB_Result::tableInfo() docs misleading
| From: | alexmerz@php.net | Date: | Tue, 27 Aug 2002 07:18:57 +0000 |
| Subject: | #19108 [Opn->Csd]: DB_Result::tableInfo() docs misleading | ||
| References: | 1 | Groups: | php.pear.dev |
| Request: | Send a blank email to pear-dev+get-8678@lists.php.net to get a copy of this message | ||
ID: 19108
Updated by: alexmerz@php.net
Reported By: stephan@wanderinghorse.net
-Status: Open
+Status: Closed
Bug Type: PEAR related
Operating System: n/a
PHP Version: 4.2.0
New Comment:
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/
Previous Comments:
------------------------------------------------------------------------
[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