DB_common::getListOf() -- Views database system information
Opis
Retrieves information about database users, avaible databases,
views and functions.
Parametr
- string
$type
type of requested info,
valid values for $type
are database dependent, ie:
tables,
databases, users,
view, functions
Zwracana wartość
array - an ordered array containing the requested data
or a DB_Error object on failure
Wyjątki
Tabela 35-1. Możliwe wartości PEAR_Error
| Error code | Error message | Reason | Solution |
|---|
| DB_ERROR_UNSUPPORTED |
not supported
|
The requested information is not avaible.
|
Check your user permissions and the database system for
support quering the requested information.
|
Uwagi
Ta funkcja nie może być wywołana
statycznie.
Przykład
Przykład 35-1. Using getListOf()
<?php
// Once you have a valid DB object named $db...
$data = $db->getListOf('tables');
if (PEAR::isError($data)) {
die($data->getMessage());
}
echo implode("\n", $data);
?>
|
|