我在使用内部连接工作时遇到了一些问题..好吧,我确定这是违规行,因为我的绑定,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
但是当我使用数组时,这个结构在整个代码中都有效。