|
PDOStatement::getColumnMetaReturns metadata for a column in a result set Description
public array PDOStatement::getColumnMeta
( int
$column
)Warning
This function is EXPERIMENTAL. The behaviour of this function, its name, and surrounding documentation may change without notice in a future release of PHP. This function should be used at your own risk. Retrieves the metadata for a 0-indexed column in a result set as an associative array. Warning
Not all PDO drivers support PDOStatement::getColumnMeta. Parameters
Return ValuesReturns an associative array containing the following values representing the metadata for a single column:
Returns Changelog
Examples
Example #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 The above example will output: array(6) { ["native_type"]=> string(7) "integer" ["flags"]=> array(0) { } ["name"]=> string(8) "COUNT(*)" ["len"]=> int(-1) ["precision"]=> int(0) ["pdo_type"]=> int(2) } See Also
|