【发布时间】:2016-07-19 07:43:34
【问题描述】:
在输入更多数据之前尝试截断表时,我收到此错误“解析错误:语法错误,意外的 'TABLE' (T_STRING)”。
<?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中写下你的查询