我能做些什么来修复我的代码?我收到以下错误消息,当我运行程序:致命错误:调用未定义的方法PDOStatement :: fetch_row()
Fatal error: Call to undefined method PDOStatement::fetch_row() in C:\apache2\Apache2\htdocs\ch\ch32\listing32_2(1).php on line 12
<?php
// Instantiate the mysqli class
$db = new PDO("mysql:host=localhost;dbname=coorporate", "root", "xxxxxxxx");
// Assign the employeeID
$eid = htmlentities($_POST['id']);
// Execute the stored procedure
$result = $db->query("SELECT calculate_bonus('$eid')");
$row = $result->fetch_row();
printf("Your bonus is \$%01.2f",$row[0]);
?>