我在让我的 innerjoin 工作时遇到了一点问题。好吧,我确定这是有问题的行,因为我的绑定和 fetch_array 似乎是有序的。
这是我的代码:
$GetQuestion = $STD->prepare("
SELECT Users.ID, SecurityQuestion.Question, SecurityQuestion.Answer, SecurityQuestion.Show
FROM Users AS Users
INNER JOIN SecurityQuestion AS SecurityQuestion
ON Users.ID = SecurityQuestion.UserID WHERE Users.Username=?");
$GetQuestion->bind_param("s", $_GET['RecoverUsername']);
$GetQuestion->execute();
$Results = $GetQuestion->fetch_array(MYSQLI_ASSOC);
给出的错误是:
Fatal error: Call to undefined method mysqli_stmt::fetch_array() in /var/www/New/ForgotPassword.php on line 47
但是当我使用数组时,这个结构在我的整个代码中都有效。