5
有沒有簡單的方法來回顯存儲在綁定參數中的值。使用PHP PDO顯示bindParam的值
$sql ="call storedproc(:firstname, :lastname)";
$stmt = $this->DBH->prepare($sql);
$stmt->bindParam(':firstname', $fname);
$stmt->bindParam(':lastname', $lname);
//I want to do this
echo $stmt->firstname;
$stmt->execute;
應該指出的是,目前這個函數不打印存儲在參數中的值,而不應用每個PHP Bug#52384的補丁https://bugs.php.net/patch-display.php?bug_id=52384&patch=pdo_debugDumpParams_p3 .txt&revision = latest – SamHuckaby 2013-04-18 17:40:13
以上報價已在php手冊中更新。從中刪除「價值」,最重要的部分......--( – 10us 2015-04-15 10:07:04