-2
while($message = mysql_fetch_assoc($run)) {
}
如何將我的代碼轉換爲PDO?
謝謝!
while($message = mysql_fetch_assoc($run)) {
}
如何將我的代碼轉換爲PDO?
謝謝!
PDO替代是PDO::FETCH_ASSOC
while ($row = $stmt->fetch(PDO::FETCH_ASSOC)) {
$data = $row."\n";
print $data;
}
http://php.net/manual/en/pdostatement.fetch.php –