PHP 中的MySQL TRUNCATE TABLE
$host="localhost";
$username="user";
$pass table="table_name";
$connection = mysql_connect("$host", "$username", " $password") 或die ("無法連線到伺服器");
mysql_select_db("$database") 或die ( "無法選擇資料庫");
$sql = "TRUNCATE TABLE `$table`";
mysql_query ($sql);
echo "表格已刪除";
mysql_close($connection);
?
mysql_close($connection);
?