Home > OS >  Call to undefined method mysqli_result::fetch_column()
Call to undefined method mysqli_result::fetch_column()

Time:12-13

I wanted to transfer my website, which I have been dealing with on localhost for 5 days, to a real hosting yesterday.

The site works fine on my localhost, but when I transfer it to my host it gives the error.

Call to undefined method mysqli_result::fetch_column()

I'm aware that the problem is fetch_column() on line 62 but I couldn't find the solution.

$users = $_POST["usernameInput"];
$control = $baglanti->query("SELECT * FROM users WHERE username = '$users' ");
$sonuc = $control->fetch_column();
if($sonuc==0) {
    $username = $_POST["usernameInput"];
} else {
    $username_err = "This username has been used before!";
}

CodePudding user response:

This method is only available as of PHP 8.1. You must be using an outdated PHP version. Please check and upgrade.

  • Related