我想获取数据库中accounts表的所有内容
除了
$select='select * from accounts';
$sth=$dbc->prepare($select);
$sth->setFetchMode(PDO::FETCH_ASSOC);
$sth->execute(array());
foreach($sth as $a){}
这种方法外。还有其他方法么?前提是PDO。
就是我想将accounts表里面的所有内容赋予一个变量$b上。
$b在foreach外也可以使用。有没有一次过提取所有内容的PDO语句?