PDOStatement::getColumnMeta(PHP 5 >= 5.1.0, PECL pdo >= 0.2.0) PDOStatement::getColumnMeta — Returns metadata for a column in a result set Описание
array PDOStatement::getColumnMeta
( int $column
)
Внимание
Эта функция является ЭКСПЕРИМЕНТАЛЬНОЙ. Поведение этой функции, ее имя и относящаяся к ней документация могут измениться в последующих версиях PHP без уведомления. Используйте эту функцию на свой страх и риск. Retrieves the metadata for a 0-indexed column in a result set as an associative array. Внимание
Not all PDO drivers support PDOStatement::getColumnMeta(). Список параметров
Возвращаемые значенияReturns an associative array containing the following values representing the metadata for a single column:
Returns FALSE if the requested column does not exist in the result set, or if no result set exists. Список изменений
Примеры
Пример #1 Retrieving column metadata The following example shows the results of retrieving the metadata for a single column generated by a function (COUNT) in a PDO_SQLITE driver.
<?phpРезультат выполнения данного примера:
array(6) {
["native_type"]=>
string(7) "integer"
["flags"]=>
array(0) {
}
["name"]=>
string(8) "COUNT(*)"
["len"]=>
int(-1)
["precision"]=>
int(0)
["pdo_type"]=>
int(2)
}
Смотрите также
|
||||||||||||||||||||||||