Occasionally you may need to remove all records from a database table to reset the data. The following code is a quick reference to delete all of the records within a table. It can be copy/paste into a PHP page, then it will work after modify the reference to the database and/or tables.
This is just quick reference to remove all records from a database:
PHP Code:
$deleteSQL = "DELETE FROM inventory";
mysql_select_db($database_database, $databse);
$Result1 = mysql_query($deleteSQL, $database) or die(mysql_error());
No comments:
Post a Comment