|
PDOStatement::getColumnMetaReturns metadata for a column in a result set Description
public array PDOStatement::getColumnMeta
( int
$column
)Retrieves the metadata for a 0-indexed column in a result set as an associative array. Warning
Not all PDO drivers support PDOStatement::getColumnMeta. The following drivers support this method: Parameters
Return ValuesReturns an associative array containing the following values representing the metadata for a single column:
Returns 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.
<?phpThe 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
|