count sql query in php
snippet in php

count sql query in php

user7293

$sql = "SELECT COUNT(*) AS total from Members";
$result = $conn->query($sql);
$data =  $result->fetch_assoc();
echo $data['total'];