Pdo::id
最後に実行したSELECTの全行から、1つのカラムの値を取得します
説明
public array Pdo::id( string $index )
最後のSELECTの全行から1つのカラムの値を取り出し、リストで返します。
引数
| 名前 | データ型 | デフォルト | 備考 |
|---|---|---|---|
| $index | string | カラム名 |
例
Controller
$db = new \Fegg\Database\Pdo();
$titles = $db->setItem('title')->select('cms_news')->execute()->id('title');
// -> array('A', 'B', 'C')