A
A
Andrey Angelovich Stock2018-04-26 10:02:54
PHP
Andrey Angelovich Stock, 2018-04-26 10:02:54

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);

thanks for the help

Answer the question

In order to leave comments, you need to log in

2 answer(s)
A
alexalexes, 2018-04-26
@alexalexes

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 question

Ask a Question

731 491 924 answers to any question