The correct query to MySQL?


Warning: count(): Parameter must be an array or an object that implements Countable in /home/styllloz/public_html/qa-theme/donut-theme/qa-donut-layer.php on line 274
0 like 0 dislike
9 views
Hello! Below is the query to the database . What's 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('could Not connect to database' . mysqli_error($link)); $load = $_POST['load']; $query = "SELECT * FROM completed_data where `c_name`='$load'"; $res = mysqli_query($link, $query) or die("Error" . mysqli_error($link)); print_r($res); echo '
'; mysqli_close($link);


Thanks for the help
by | 9 views

2 Answers

0 like 0 dislike
The query is run. $res does not store the selection.
The sample need to pull, fetch-function.
by
0 like 0 dislike
The absence of result – too result. The problems were not there in the result of the query returned zero rows. And as already said to see a sample, need to go through it or, for example (for debugging), use
print_r(mysqli_fetch_all($res))
by

Related questions

0 like 0 dislike
1 answer
asked May 12, 2019 by your_uncle
0 like 0 dislike
1 answer
0 like 0 dislike
2 answers
asked Apr 11, 2019 by Stazhor
0 like 0 dislike
1 answer
asked Apr 13, 2019 by LordPrimes
0 like 0 dislike
2 answers
110,608 questions
257,187 answers
0 comments
40,796 users