|  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #19108 DB_Result::tableInfo() docs misleading
Submitted: 2002-08-26 11:37 UTC Modified: 2002-08-27 04:25 UTC
From: stephan at wanderinghorse dot net Assigned:
Status: Closed Package: PEAR related
PHP Version: 4.2.0 OS: n/a
Private report: No CVE-ID: None
View Add Comment Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
You can add a comment by following this link or if you reported this bug, you can edit this bug over here.
Block user comment
Status: Assign to:
Bug Type:
From: stephan at wanderinghorse dot net
New email:
PHP Version: OS:


 [2002-08-26 11:37 UTC] stephan at wanderinghorse dot net
DB_Result::tableInfo() docs say as follows:  
DB_Result::tableInfo() -- returns meta data about the    
result set    
mixed tableInfo (DB_Result $result [, mode $mode])    
That is misleading, however: it cannot be called  
  $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 );  


Add a Patch

Pull Requests

Add a Pull Request


AllCommentsChangesGit/SVN commitsRelated reports
 [2002-08-27 03:18 UTC]
Every entry headline is written as Package::Function. It does not indicate any static behavior.

Peardoc 2 will clearifed this. See Draft on
 [2002-08-27 04:10 UTC] stephan at wanderinghorse dot net
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  
 [2002-08-27 04:25 UTC]
DB_Result::tableInfo() is marked as deprecated, so it is not in the new manual.
PHP Copyright © 2001-2021 The PHP Group
All rights reserved.
Last updated: Sun Aug 01 15:01:24 2021 UTC