Question: I'm currently just messing around with mysql. I'm not able to delete all the rows from the table "amount" with this code `mysqli_query($conn, "DELETE FORM amount");` . With that code, I'm not even able to access my page.

```
$conn = new mysqli(localhost, $username, $password, $database);

// Check connection
if ($conn->connect_error) {
    die("Connection failed: " . $conn->connect_error);
} 

$sql = "INSERT INTO freetexts (amount)
VALUES ('3')";

if ($conn->query($sql) === TRUE) {
    echo "New record created successfully";
} else {
    echo "Error: " . $sql . "<br>" . $conn->error;
}

$sql = "SELECT amount FROM freetexts";
$result = $conn->query($sql);

if ($result->num_rows > 0) {
    // output data of each row
    while($row = $result->fetch_assoc()) {
        echo "Amount: " . $row["amount"];
    }
} else {
    echo "0 results";
}
mysqli_query($conn, "DELETE FROM amount");

$conn->close();

```

Answer: 
`$column = freetexts;`

You need to change

`mysqli_query($conn, "DELETE FROM amount");`

to

```
mysqli_query($conn, "DELETE FROM  `$column` WHERE 1");

```
The BD probably has a protection denying the command to delete all rows without a condition clause.

Try this: TRUNCATE [table\_name]