Answer the question
In order to leave comments, you need to log in
Correct query to MySQL?
Hello! Below is a query to the database. What is the problem? Issues
mysqli_result Object ( [current_field] => 0 [field_count] => 7 [lengths] => [num_rows] => 0 [type] => 0 )
require_once 'connection.php';
$link = mysqli_connect($host, $user, $password, $database) or die('Не смог подключиться к БД' . mysqli_error($link));
$load = $_POST['load'];
$query = "SELECT * FROM completed_data where `c_name`='$load'";
$res = mysqli_query($link, $query) or die("Ошибка " . mysqli_error($link));
print_r($res);
echo '<br>';
mysqli_close($link);
Answer the question
In order to leave comments, you need to log in
The request has been completed. $res does not store a selection.
The selection must be pulled out by the fetch-function .
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question