title: clear all the entries from a table with php
body: <p>I want to clear all the entries from one table in MySQL with php
  I tried this:</p>
  
  <pre><code>&lt;?php
  // Create connection
          $con=mysqli_connect("localhost","username","password","dbName");
  
  // Check connection
          if (mysqli_connect_errno($con))
          {
              echo "Failed to connect to MySQL: " . mysqli_connect_error();
          }    
  
      $sql = "TRUNCATE TABLE tableName";
      mysqli_query($sql);
  ?&gt;
  </code></pre>
  
  <p>but it didn't work. why?</p>