-2
I have a script in PHP and Mysql that has a query responsible for counting how many records (clients) are inserted in one of the tables of my database. However, I need to show the amount of records (clients) in the table with the echo command, but I don’t know how to do it. Below is my code:
<?php
include_once 'conexao.php';
$sql = $dbcon->query("SELECT COUNT(*) FROM tbClientes");
?>
I tried to use echo $sql;
but it didn’t work out.
echo $sql['COUNT(*)'];
– Vinicius De Jesus