错误:
列数与第1行的值数不匹配

码:

mysql_query("INSERT INTO users VALUES('','$username', '$password',
    '$icq', '$email', '$ip', now(), 'NULL', 0, 0.00, 0, '$ip',
    '0', '0', 0, 0,'0','0','$plainpw')") or die (mysql_error());


用户表:

INSERT INTO  `store`.`users` (
`username` ,
`password` ,
`icq` ,
`email` ,
`ips` ,
`regdate` ,
`lastlogin` ,
`failedlogin` ,
`balance` ,
`checkercredits` ,
`lastip` ,
`amount_purchased` ,
`amount_refunds` ,
`admin` ,
`banned`
)
VALUES (
'test',  'test',  '44444',  '4444@email.com',  '127.0.0.1',  '0',  '0',  '0',  '0',  '0',  '0',  '0',  '0',  '0',  '0'
);

最佳答案

您输入的值太少或太多。计算表中的列数,并对照您尝试插入的值数进行检查。

09-05 02:19
查看更多