title: Deleting all rows from table
body: <p>I'm currently just messing around with mysql. I'm not able to delete all the rows from the table "amount" with this code <code>mysqli_query($conn, "DELETE FORM amount");</code> . With that code, I'm not even able to access my page.</p>
  
  <pre><code>$conn = new mysqli(localhost, $username, $password, $database);
  
  // Check connection
  if ($conn-&gt;connect_error) {
      die("Connection failed: " . $conn-&gt;connect_error);
  } 
  
  $sql = "INSERT INTO freetexts (amount)
  VALUES ('3')";
  
  if ($conn-&gt;query($sql) === TRUE) {
      echo "New record created successfully";
  } else {
      echo "Error: " . $sql . "&lt;br&gt;" . $conn-&gt;error;
  }
  
  $sql = "SELECT amount FROM freetexts";
  $result = $conn-&gt;query($sql);
  
  if ($result-&gt;num_rows &gt; 0) {
      // output data of each row
      while($row = $result-&gt;fetch_assoc()) {
          echo "Amount: " . $row["amount"];
      }
  } else {
      echo "0 results";
  }
  mysqli_query($conn, "DELETE FROM amount");
  
  $conn-&gt;close();
  </code></pre>