Truncate
<?php $user = "user"; $password = "password"; $host = "host"; $database= "database"; $connection= mysql_connect ($host, $user, $password); if (!$connection) { die ('Could not connect:' . mysql_error()); } mysql_select_db($database, $connection); $truncatetable= mysql_query("TRUNCATE TABLE table_name"); if($truncatetable !== FALSE) { echo("All rows have been deleted."); } else { echo("No rows have been deleted."); } ?>