PEAR is discontinued

This is a static archive preserving historical releases and metadata. No new packages or updates will be published. For updates to existing packages, or to publish new packages, please use Composer and Packagist.

Home » Database » MDB » Bug #975

[MDB1] oci8 feature request: listTableFields()

Details

Submitted2004-03-09 00:12 UTC
Fromthierrybo at freesurf dot fr²
Assignedlsmith
StatusClosed
PackageMDB
PHP Version4.3.2
OSwin32XP
Roadmaps(Not assigned)

Comments

[2004-03-09 00:12 UTC] thierrybo at freesurf dot fr²

Description:
------------
Here is my sapme code, same question as listTables(), do we need to always lower case or on ly id 'portability' is set?

function listTableFields(&$db, $table)
{
$table = strtoupper($table);
$columns = $db->queryCol("SELECT column_name
FROM user_tab_columns
WHERE table_name='$table'
ORDER BY column_id");
if(MDB::isError($result)) {
return($result);
}
if ($db->options['optimize'] == 'portability') {
$columns = array_flip($columns);
$columns = array_change_key_case($columns, CASE_LOWER);
$columns = array_flip($columns);
}
return($columns);
}