mysql - 列数与行的值计数不匹配

error: Column count doesn't match value count at row 1

Code:

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());

user Table:

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'
);

You're entering too few, or too many values. Count the number of columns in your table, and check that against the number of values you're attempting to insert.

Mysql extension is deprecated.use the Mysqli or PDO extensions. Please Check the count of columns in your table.

Example for PDO_Mysql

$link = new PDO("mysql:host=$dbhost;dbname=$dbname",$dbusername,$dbpassword);

$statement = $link->prepare("INSERT INTO testtable(name, lastname, age)
    VALUES(:fname, :sname, :age)");
$statement->execute(array(
    "fname" => "text",
    "sname" => "text",
    "age" => "18"
));

You will get clearly which columns you are missing. Thanks

You are tryin to insert 19 values into a table that has 15 columns... So make sure its the right table or that you are inserting the right values.