DB_DataObject Bug #612http://pear.php.net/bugs/612
[Closed] databaseStructure() says it's static, but it may not been-uspear-webmaster@lists.php.netpear-webmaster@lists.php.nethourly12000-01-01T12:00+00:00

databaseStructure() says it's static, but it may not beDescription:
------------
databaseStructure() docs say that it is static, but it makes use of $this->_database and $this->_table when called with no arguments.
As a side note, how should I be loading the configration for a database? The DB_DataObject config is loaded from the ini file at the beginning of my script, but the database's INI settings aren't loaded until I use a table. I want to be able to get a listing of tables in the DB before making a DO.
Reproduce code:
---------------
DB_DataObject::databaseStructure();justinpatrin
justinpatrinhttp://pear.php.net/bugs/612
DB_DataObject Bug
Reported by justinpatrin
2004-01-22T13:33:25+00:00
PHP: 4.3.3 OS: Linux Package Version:
Description:
------------
databaseStructure() docs say that it is static, but it makes use of $this->_database and $this->_table when called with no arguments.
As a side note, how should I be loading the configration for a database? The DB_DataObject config is loaded from the ini file at the beginning of my script, but the database's INI settings aren't loaded until I use a table. I want to be able to get a listing of tables in the DB before making a DO.
Reproduce code:
---------------
DB_DataObject::databaseStructure();]]>DB_DataObject Bug
Reported by justinpatrin
2004-01-22T13:33:25+00:00
PHP: 4.3.3 OS: Linux Package Version:
Description:
------------
databaseStructure() docs say that it is static, but it makes use of $this->_database and $this->_table when called with no arguments.
As a side note, how should I be loading the configration for a database? The DB_DataObject config is loaded from the ini file at the beginning of my script, but the database's INI settings aren't loaded until I use a table. I want to be able to get a listing of tables in the DB before making a DO.
Reproduce code:
---------------
DB_DataObject::databaseStructure();]]>2004-01-22T13:33:25+00:00
alan_k [2004-01-24 02:22] http://pear.php.net/bugs/612#1074910979
This bug has been fixed in CVS.
In case this was a documentation problem, the fix will show up at the
end of next Sunday (CET) on pear.php.net.
In case this was a pear.php.net website problem, the change will show
up on the website in short time.
Thank you for the report, and for helping us make PEAR better.
fixed in CVS
try print_r(DB_DataObject::databaseStructure('databasename'));
** it will also return *__key in the array..
otherwise try
$db = new DB_DataObject;
$DB = $db->getDatabaseConnection();
$DB->getListOf('tables');]]>This bug has been fixed in CVS.
In case this was a documentation problem, the fix will show up at the
end of next Sunday (CET) on pear.php.net.
In case this was a pear.php.net website problem, the change will show
up on the website in short time.
Thank you for the report, and for helping us make PEAR better.
fixed in CVS
try print_r(DB_DataObject::databaseStructure('databasename'));
** it will also return *__key in the array..
otherwise try
$db = new DB_DataObject;
$DB = $db->getDatabaseConnection();
$DB->getListOf('tables');]]>2004-01-24T02:22:59+00:00