1
$result = $db->("SELECT `count` FROM playerCount");
while($row = mysql_fetch_assoc($result)) {
echo $row['count'];
}
我如何轉換線: 而($行= mysql_fetch_assoc($結果)){如何將mysql_fetch_assoc轉換爲PDO?
到PDO?
謝謝。
$result = $db->("SELECT `count` FROM playerCount");
while($row = mysql_fetch_assoc($result)) {
echo $row['count'];
}
我如何轉換線: 而($行= mysql_fetch_assoc($結果)){如何將mysql_fetch_assoc轉換爲PDO?
到PDO?
謝謝。
$stmt = $db->query(...);
while($row = $stmt->fetch(PDO::FETCH_ASSOC)) {