Sunday, 15 April 2012

php - nothing inserted error: column count doesn't match value count at row 1 -



php - nothing inserted error: column count doesn't match value count at row 1 -

i trying insert info form table in mysql database. have tried ensure entered right value without leaving value out still returns error "nothing inserted error: column count doesn't match value count @ row 1".

the code insert is:

$sql="insert athletes (surname, name, second_name, date_of_birth, gender, club, rank, country_obtained, date_joined, postal_address, physical_address, contact_number, national_id_passport_number) values ('$_post[sur]','$_post[name]','$_post[second]','$_post[dob]','$_post[gender]','$_post[club]','$_post[rank]','$_post[co]','$_post[djoined]','$_post[pa]','$_post[pha]','$_post[cn]''$_post[nid]')";

please allow me know if not plenty provide more information.

thanks in advance.

in lastly line missing ,

,'$_post[cn]''$_post[nid]') <--here

php mysql

No comments:

Post a Comment