|
PDOStatement::getColumnMetaReturns metadata for a column in a result set Description
public arrayfalse PDOStatement::getColumnMeta(int
$column )Retrieves the metadata for a 0-indexed column in a result set as an associative array. Warning
Some drivers may not implement PDOStatement::getColumnMeta, as it is optional. However, all PDO drivers documented in the manual implement this function. 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.
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
|