I want to know the total products in my product table but it shows an error. What will be the right syntax?
here is my code:
$sql = "SELECT COUNT(product_name) FROM product";
$result=mysqli_query($this->conn,$sql);
$row = $result->fetch_object();
$neeraj = $row->COUNT(product_name);
echo $neeraj;