I am trying to use a simple compare function of the results of a MySQLi database query but I keep getting "stdClass could not be converted to int" for the following code snippet:
$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) {
The very last line there is what throws the error... What am I doing wrong?