$result = $db->("SELECT `count` FROM playerCount");
while($row = mysql_fetch_assoc($result)) {
echo $row['count'];
}
我该如何转换行: while($ row = mysql_fetch_assoc($ result)){
到PDO?
感谢。
答案 0 :(得分:4)
$stmt = $db->query(...);
while($row = $stmt->fetch(PDO::FETCH_ASSOC)) {