1
$result = $db->("SELECT `count` FROM playerCount");
while($row = mysql_fetch_assoc($result)) {
      echo $row['count'];
}

如何转换行:while($row = mysql_fetch_assoc($result)) {

到 PDO?

谢谢。

4

1 回答 1

4
$stmt = $db->query(...);
while($row = $stmt->fetch(PDO::FETCH_ASSOC)) {
于 2013-07-23T01:24:29.667 回答