Pdo::id
Get the specific column's list of executed select query
Description
public array Pdo::id( string $index )
Returns the values of one column of every row of the last SELECT, as a list.
Arguments
| Name | Data type | Default | Remarks |
|---|---|---|---|
| $index | string | Column name |
Example
Controller
$db = new \Fegg\Database\Pdo();
$titles = $db->setItem('title')->select('cms_news')->execute()->id('title');
// -> array('A', 'B', 'C')