我知道这非常容易,但我是一个菜鸟,不确定我在这里做错了什么:
1: $mysqli = new mysqli('test', 'test', 'test', 'test');
2: if ($stmt = $mysqli->prepare($query)) {
3: if (!$stmt->execute()) {
4: $out .= "Execute failed: (" . $stmt->errno . ") " . $stmt->error;
5: }
6: $out = $stmt->fetch_array();
7: } else {
8: $out .= $mysqli->error;
9: }
我在第 6 行收到Fatal error: Call to undefined method mysqli_stmt::fetch_array()
错误消息。