Insertion Failed:Column count doesn't match value count at row 1

248 Views Asked by At
(`full_name`,`user_email`,`pwd`,`address`,`tel`,`fax`,`website`,`date`,`users_ip`,`activation_code`,`country`,`user_name`
        )
        VALUES
        ('$data[full_name]','$usr_email','$sha1pass','$data[tel]','$data[fax]','$data[web]'
        ,now(),'$user_ip','$activ_code','$data[country]','$user_name'
        )
        ";

What should I do? Sorry I am only 14 and am still learning.

3

There are 3 best solutions below

1
On BEST ANSWER

You are not adding the address value into your values list (after password) even though you are mentioning that you are trying to insert it into the table.

0
On

You have twelve columns mentioned in your INSERT statement but only provide eleven values. You need to find out which column you forgot to add a value for and add that to your query. It looks like it is the value for address.

0
On

You are passing in 11 parameters as the data, rather than 12. You must provide a value to every field you specify in the query.