Note that there are some explanatory texts on larger screens.

plurals
  1. POPHP Column count doesn't match
    primarykey
    data
    text
    <p>i am trying to run an SQL query in PHP.. using this below code:</p> <pre><code>$sql="INSERT into members (forename, surname, dob_day, dob_month, dob_year, gender, address, invested, patrol_type, patrol, dr_address, parent1_contact1_title, parent1_contact1_forename, parent1_contact1_surname, parent1_contact1_email, parent1_contact1_address, parent1_contact1_home, parent1_contact1_mobile, parent1_contact1_other, parent1_contact2_title, parent1_contact2_forename, parent1_contact2_surname, parent1_contact2_email, parent1_contact2_address, parent1_contact2_home, parent2_contact1_mobile, parent1_contact2_other, parent2_contact1_title, parent1_contact1_forename, parent1_contact1_surname, parent1_contact1_email, parent1_contact1_address, parent1_contact1_home, parent1_contact1_mobile, parent1_contact1_other, parent1_contact2_title, parent1_contact2_forename, parent1_contact2_surname, parent1_contact2_email, parent1_contact2_address, parent1_contact2_home, parent2_contact1_mobile, parent1_contact2_other ) values ('".addslashes($_POST["forename"])."', '".addslashes($_POST["surname"])."', '".addslashes($_POST["dob_day"])."', '".addslashes($_POST["dob_month"])."', '".addslashes($_POST["dob_year"])."', '".addslashes($_POST["gender"])."', '".addslashes($_POST["address"])."', '".addslashes($_POST["invested"])."', '".addslashes($_POST["patrol_type"])."', '".addslashes($_POST["patrol"])."', '".addslashes($_POST["dr_address"])."', '".addslashes($_POST["parent1_contact1_title"])."', '".addslashes($_POST["parent1_contact1_forename"])."', '".addslashes($_POST["parent1_contact1_surname"])."', '".addslashes($_POST["parent1_contact1_email"])."', '".addslashes($_POST["parent1_contact1_address"])."', '".addslashes($_POST["parent1_contact1_home"])."', '".addslashes($_POST["parent1_contact1_mobile"])."', '".addslashes($_POST["parent1_contact1_other"])."', '".addslashes($_POST["parent1_contact2_title"])."', '".addslashes($_POST["parent1_contact2_forename"])."', '".addslashes($_POST["parent1_contact2_surname"])."', '".addslashes($_POST["parent1_contact2_email"])."', '".addslashes($_POST["parent1_contact2_address"])."', '".addslashes($_POST["parent1_contact2_home"])."', '".addslashes($_POST["parent1_contact2_mobile"])."', '".addslashes($_POST["parent1_contact2_other"])."', '".addslashes($_POST["parent2_contact2_title"])."', '".addslashes($_POST["parent1_contact2_forename"])."', '".addslashes($_POST["parent1_contact2_surname"])."', '".addslashes($_POST["parent1_contact2_email"])."', '".addslashes($_POST["parent1_contact2_address"])."', '".addslashes($_POST["parent1_contact2_home"])."', '".addslashes($_POST["parent1_contact2_mobile"])."', '".addslashes($_POST["parent1_contact2_other"])."' ) "; </code></pre> <p>but i am getting an error saying: <code>Column count doesn't match value count at row 1</code></p> <p>i cannot find where the error is - can anyone find this?</p>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload