我从 mySQL 收到此错误消息:
You have an error in your SQL syntax; check the manual that corresponds to your
MySQL server version for the right syntax to use near 'key,time)
VALUES ('FreeTest','86400')' at line 2
这是代码:
if ((isset($_POST['key'])) && (isset($_POST['days']))) {
$key = mysql_escape_string($_POST['key']);
$days = mysql_escape_string($_POST['days'] * 86400);
$add = "INSERT INTO licence
(key,time)
VALUES
('$key','$days')";
$addkey = mysql_query($add);
}