メインコンテンツまでスキップ
Version: Fegg 4.x

DB_pdo::select

SELECTクエリを設定

説明​

public self DB_pdo::select( string $table )

引数​

名前データ型デフォルト備考
$tablestring対象テーブル名

例​

Controller
$db = $this->getClass('DB');

// 基本的なSELECT
$result = $db->select('users')->fetchAll();

// 条件付きSELECT
$result = $db->select('users')
->where('status', 1)
->fetchAll();