0

我正在尝试使用 MySQLi 数据库查询结果的简单比较函数,但对于以下代码片段,我不断收到“stdClass 无法转换为 int”:

$stmt = mysqli_prepare($this->connection, "SELECT access_user_id, failed_login_count FROM $this->accesstable where username=?");
            $this->throwExceptionOnError();

            mysqli_stmt_bind_param($stmt, 's', $trimmedUsername);       
            $this->throwExceptionOnError();

            mysqli_stmt_execute($stmt);
            $this->throwExceptionOnError();

            mysqli_stmt_bind_result($stmt, $user_id->access_user_id, $failed_login_count->failed_login_count);

            $failed_login_count = (int)$failed_login_count;

            if(mysqli_stmt_fetch($stmt)) {

                if($failed_login_count < 10) {

最后一行是什么引发了错误......我做错了什么?

4

0 回答 0