我在输入更多数据之前尝试截断表时收到此错误“分析错误:语法错误,意外的'TABLE'(T_STRING)”。截断表mysql php提供的错误
<?php
$servername = "localhost";
$username = "root";
$password = "";
$dbname = "members";
// Create connection
$conn = mysqli_connect($servername, $username, $password, $dbname);
// Check connection
if (!$conn) {
die("Connection failed: " . mysqli_connect_error());
}
TRUNCATE TABLE users;
{
header ("Location: order.php");
exit;
}
mysqli_close($conn);
?>
写里面[mysqli_query]您的查询(HTTP ://php.net/manual/en/mysqli.query.php) – Saty