|
PDOStatement::fetchColumnReturns a single column from the next row of a result set Description
public string PDOStatement::fetchColumn
([ int
$column_number = 0
] )
Returns a single column from the next row of a result set or Parameters
Return ValuesPDOStatement::fetchColumn returns a single column in the next row of a result set. Warning
There is no way to return another column from the same row if you use PDOStatement::fetchColumn to retrieve data. Examples
Example #1 Return first column of the next row
<?php The above example will output: Fetch the first column from the next row in the result set: name = lemon Fetch the second column from the next row in the result set: colour = red See Also
|