How do I print the number of user?

$left_from_chat = $db->query("SELECT COUNT(*) FROM user_confs WHERE peer_id = 2000000008 AND left_from_chat = 1");
$vk->sendMessage($peer_id, $left_from_chat);

There's a code that I need from the database print the number of users $left_from_chat = 1, but because I am a stupid person, a request apparently not correct and instead the number of users in the var_dump I get
object(mysqli_result)#2 (5) { ["current_field"]=> int(0) ["field_count"]=> int(1) ["lengths"]=> NULL ["num_rows"]=> int(1) ["type"]=> int(0) }
April 19th 20 at 12:33
2 answers
April 19th 20 at 12:35
Unfortunately the answer is not found... - hilton.Lark commented on April 19th 20 at 12:38
Oh, and, the request to the database, so the count tag does not fit here) - hilton.Lark commented on April 19th 20 at 12:41
April 19th 20 at 12:37
5e99c2c195805756271407.png

I have everything working. Try my request to substitute.
SELECT COUNT(*) FROM `bp_users` WHERE `login` = 'isus' and `email` = 'cemail@mail.ru'
Hah, nothing at all has not changed, well, SQL, I, too, get the answer, but in the document it is not right when it displays) - hilton.Lark commented on April 19th 20 at 12:40
@hilton.Lark, then see what other options have $db->query and that all may return. - alexis commented on April 19th 20 at 12:43
@alexis, strange advice, because $db->query is the query to the database... - hilton.Lark commented on April 19th 20 at 12:46
@hilton.Lark, uh... well, OK. - alexis commented on April 19th 20 at 12:49
@hilton.Lark, then do it a crutch as advised above first answer.
doing select * from
and count() - alexis commented on April 19th 20 at 12:52
@alexis, I certainly will try, but I'm guessing that it won't work, but we'll see) - hilton.Lark commented on April 19th 20 at 12:55
@alexis, well I tried, but no) - hilton.Lark commented on April 19th 20 at 12:58

Find more questions by tags PHP