Получить запрос на счет SQL в PHP
$result=mysql_query("SELECT count(*) as total from Students");
$data=mysql_fetch_assoc($result);
echo $data['total'];
Ankur
$result=mysql_query("SELECT count(*) as total from Students");
$data=mysql_fetch_assoc($result);
echo $data['total'];
$que2="SELECT COUNT(*) as countrow FROM attendance WHERE loginTime LIKE '2022-06-02%'";
$res2=mysqli_query($con,$que2);
$data=mysqli_fetch_assoc($res2);
echo $data['countrow'];
$sql = "SELECT COUNT(*) AS total from Members";
$result = $conn->query($sql);
$data = $result->fetch_assoc();
echo $data['total'];
PHP Count result