MySQL on PHP | Errors

Hi, glitchers! I have a problem with MySQL. My code: <?php
require_once ‘connection.php’; // подключаем скрипт

// подключаемся к серверу
$link = mysqli_connect($host, $user, $password, $database)
or die("Ошибка " . mysqli_error($link));

// выполняем операции с базой данных
$query =‘SELECT * FROM test WHERE servers’;
$result = mysqli_query($link, $query) or die("Ошибка " . mysqli_error($link));
?> Throws an error: [Fri May 22 20:06:43 2020] PHP Catchable fatal error: Object of class mysqli_result could not be converted to string in /app/index.php on line 64

Sorry for the late response, but check this out:

@RiversideRocks, Thanks for the answer, but I figured it out for a long time :slight_smile:

1 Like