Trying to get total count of rows using variable in sql query but not able to get that can anyone here help me with this ?
<?php
$business = $value['business_name'];
//echo $business;
$sql = "SELECT COUNT(*) FROM listings_reviews WHERE business_name = '$business'";
$result = $conn-> query($sql);
$row = $result -> fetch_assoc();
//print_r ($row) ;
$rating = implode($row);
echo $rating;
?>
WHERE business_name = '$business'"or you want to count the amount. Edit the question again