I just start using MySQL, and try to write a little article generator. For that I need to count articles entities in database. This expression works fine when I write it in mariaDB command-line:
$articles_amount = "SELECT COUNT(*) FROM post";
$articles_amount = @mysqli_query($dbc, $articles_amount);
SELECT COUNT(*) FROM post;
output in mariaDB client:
+----------+
| COUNT(*) |
+----------+
| 3 |
+----------+
When I tried to print out the value of $artcles_amount
I get an empty string. Database connection works well for other statements.