get count mysql php code example
Example 1: select count from table mysql
SELECT COUNT(*) FROM count_demos;
Example 2: count sql query in php
$sql = "SELECT COUNT(*) AS total from Members";
$result = $conn->query($sql);
$data = $result->fetch_assoc();
echo $data['total'];