Jump to content

PLEASE HELP - insert error - "column count does not match value at line 1"


chuddyuk

Recommended Posts

when i submit my data i get this error -

"column count does not match value at line 1"

i have tried everything and it still doesnt work someone please help me its really winding me up!

[code]$sql = "INSERT INTO appform
(id,
q1,
q1a,
q2,
q2a,
q2b,
q2c,
q3,
q3a,
q4,
q5,
q6,
q7,
q8,
q9,
q10,
q11,
q12,
q13,
q14,
q15,
q16,
q17,
q18,
q19,
q20,
q21,
q22,
q23,
q24,
q25,
q26,
q27,
q28,
q29,
q30,
q31,
q32,
q32a,
q33,
q34,
q35,
q36,
q37,
q38,
q39,
q40,
q41,
q42,
q43,
q44,
q45,
q46,
q47,
q48,
q49,
q50,
q51,
q52,
q53,
q54,
q55,
q56,
q57,
q58,
q59,
q60,
q61,
q62,
q63,
q64,
q65,
q66,
q67,
q68,
q69,
q70,
q71,
q72,
q73,
q74,
q75,
q76,
q77,
q78,
q79,
q80,
q81,
q82,
q83,
q84,
q85,
q86,
q87,
q88,
q89,
q90,
q91,
q92,
q93,
q94,
q95,
q96,
q97,
q98,
q99,
q100,
q101)
VALUES
('id',
'$q1',
'$q1a',
'$q2',
'$q2a',
'$q2b',
'$q2c',
'$q3',
'$q3a',
'$q4',
'$q5',
'$q6',
'$q7',
'$q8',
'$q9',
'$q10',
'$q11',
'$q12',
'$q13',
'$q14',
'$q15',
'$q16',
'$q17',
'$q18',
'$q19',
'$q20',
'$q21',
'$q22',
'$q23',
'$q24',
'$q25',
'$q26',
'$q27',
'$q28',
'$q29',
'$q30',
'$q31',
'$q32',
'$q32a',
'$q33',
'$q34',
'$q35',
'$q36',
'$q37',
'$q38',
'$q39',
'$q40',
'$q41',
'$q42',
'$q43',
'$q44',
'$q45',
'$q46',
'$q47',
'$q48',
'$q49',
'$q50',
'$q51',
'$q52',
'$q53',
'$q54',
'$q55',
'$q56',
'$q57',
'$q58',
'$q59',
'$q60',
'$q61',
'$q62',
'$q63',
'$q64',
'$q65',
'$q66',
'$q67',
'$q68',
'$q69',
'$q70',
'$q71',
'$q72',
'$q73',
'$q74',
'$q75',
'$q76',
'$q77',
'$q78',
'$q79',
'$q80',
'$q81',
'$q82',
'$q83',
'$q84',
'$q85',
'$q86',
'$q87',
'$q88',
'$q89',
'$q90',
'$q91',
'$q92',
'$q92',
'$q93',
'$q94',
'$q95',
'$q96',
'$q97',
'$q98',
'$q99',
'$q100',
'$q101')";
$query = mysql_query($sql) or die("Cannot query the database.<br>" . mysql_error());
echo "<center>Application Sent<center>";[/code]
Link to comment
Share on other sites

hi

is id an auto_increment field? you can start by dropping that from both sides if so... as you are trying to insert a vairable it supposed to pick up from itself which i imagine doesn't work.

secondly - as much as i would love to verify the counts of the q's on both sides!!! lol!

cheers,
tdw

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.