gpt4 book ai didi

php - ( sdonate) 1067/var/www/donate/install.php : 中 'expiretime' 的默认值无效

转载 作者:行者123 更新时间:2023-11-29 16:43:06 25 4
gpt4 key购买 nike

运行/install.php时出错

[Sat Nov 10 20:43:26.241729 2018] [:error] [pid 25855] [client 108.162.237.55:35442] PHP Fatal error:  Uncaught PDOException: SQLSTATE[42000]: Syntax error or access violation: 1064 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 '\r\n                endcommands TEXT,\r\n                transactionid TEXT,\r\n      ' at line 9 in /var/www/donate/install.php:258\nStack trace:\n#0 /var/www/donate/install.php(258): PDO->exec('CREATE table tr...')\n#1 {main}\n  thrown in /var/www/donate/install.php on line 258

install.php 的第 239-260 行:

if(tableExists($dbcon, 'transactions') === FALSE){
$sql = "CREATE table transactions(
id INT(11) AUTO_INCREMENT PRIMARY KEY,
time TIMESTAMP DEFAULT CURRENT_TIMESTAMP,
purchaser TEXT,
usernametype TEXT,
username TEXT,
game TEXT,
expires INT(1),
expiretime ,
endcommands TEXT,
transactionid TEXT,
package TEXT,
packageid TEXT,
paymentmethod TEXT,
value DECIMAL(11,2),
status TEXT,
params TEXT);";
$dbcon->exec($sql);

}

软件:sdon​​ate.com不确定如何修复它,文档没有显示解决方案。

解决方案是什么?

最佳答案

expiretime 字段没有数据类型,因此出现语法错误。您需要提供数据类型(可能是基于字段名称的日期时间)。

关于php - ( sdonate) 1067/var/www/donate/install.php : 中 'expiretime' 的默认值无效,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/53245154/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com