|
PDOStatement::fetchColumnReturns a single column from the next row of a result set Description
public mixed PDOStatement::fetchColumn
([ int
$column_number = 0
] )
Returns a single column from the next row of a result set or
Parameters
Return Values
PDOStatement::fetchColumn returns a single column
from the next row of a result set or 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 first row in the result set: name = lemon Fetch the second column from the second row in the result set: colour = red See Also
|