I'm trying to count all my project in project table Project_Name is a column_name
Here is the my code I have tried:
<?php
   $sql = "SELECT COUNT(*) FROM project";
   $result = $connection->query($sql);  
   if ($result->num_rows > 0) {
      $row = $result->fetch_assoc();    
      $project_count = $row['Project_Name'];
   } 
   else {
      echo "0 results"; 
   } 
?>
 
     
     
    