Jump to content


Photo

Column count doesn't match....???


  • Please log in to reply
7 replies to this topic

#1 DarthViper3k

DarthViper3k
  • Members
  • PipPipPip
  • Advanced Member
  • 50 posts

Posted 31 January 2003 - 01:09 AM

I created my registration page and I was tryin to test it to see if it works
well

when I click on submit I get this...

Column count doesn\'t match value count at row 1

what exactly does that mean?

don\'t try to solve the problem for me
if I know what that means I can probably find the problem
[!--PHP-Head--][div class=\'phptop\']PHP[/div][div class=\'phpmain\'][!--PHP-EHead--]
switch($php) {
    case = \"given\" : {
       $website = 1;
       break;
    }     case = \"taught\" : {        $website = lifetime;        break;     } } [/span][!--PHP-Foot--][/div][!--PHP-EFoot--] The lazy never learn. The lazy are the downfall of many great things. Take the time to learn.

#2 thejayjay

thejayjay
  • New Members
  • Pip
  • Newbie
  • 9 posts

Posted 31 January 2003 - 01:38 AM

sounds like you are trying to insert too many values in a row, for example you have a \"row\" that takes 3 values and you are trying to put in 4.

hope that helps.

#3 DarthViper3k

DarthViper3k
  • Members
  • PipPipPip
  • Advanced Member
  • 50 posts

Posted 31 January 2003 - 01:39 AM

thx man

and what if thats not the case?

I checked my table and checked my SQL statement and I don\'t have anymore more values in my statement than I do in the actual table
[!--PHP-Head--][div class=\'phptop\']PHP[/div][div class=\'phpmain\'][!--PHP-EHead--]
switch($php) {
    case = \"given\" : {
       $website = 1;
       break;
    }     case = \"taught\" : {        $website = lifetime;        break;     } } [/span][!--PHP-Foot--][/div][!--PHP-EFoot--] The lazy never learn. The lazy are the downfall of many great things. Take the time to learn.

#4 metalblend

metalblend
  • Members
  • PipPipPip
  • Advanced Member
  • 89 posts
  • LocationCalifornia, USA

Posted 31 January 2003 - 06:13 AM

The error looks like you\'re trying something like this:
INSERT INTO tbl (name,url) VALUES (\'$name\',\'$url\',\'$other_var\',\'$possible_other_var\')
..where you say you\'re going to insert into 2 columns but give more than 2 values.

Hope this helps.

#5 DarthViper3k

DarthViper3k
  • Members
  • PipPipPip
  • Advanced Member
  • 50 posts

Posted 31 January 2003 - 06:45 PM

The error looks like you\'re trying something like this:

INSERT INTO tbl (name,url) VALUES (\'$name\',\'$url\',\'$other_var\',\'$possible_other_var\')
..where you say you\'re going to insert into 2 columns but give more than 2 values.

Hope this helps.


yea I know
but my problem is

I\'m not inserting more than what I have

SQL query
[php:1:c5e8d6fe77]$sql = mysql_query(\"INSERT INTO users (username, password, email, info, quote, aimsn, icq, msn, sig, signup_date)
VALUES(\'$username\', \'$db_password\', \'$htminfo\', \'$quote\', \'$aimsn\', \'$icq\', \'$msn\', \'$htmsig\', now())\")
or die(mysql_error());[/php:1:c5e8d6fe77]

my database

email 

username 

PASSWORD

info 

quote 

aimsn 

icq 

msn 

sig

user_level

signup_date 

last_login

activated


lol
I just noticed it
[!--PHP-Head--][div class=\'phptop\']PHP[/div][div class=\'phpmain\'][!--PHP-EHead--]
switch($php) {
    case = \"given\" : {
       $website = 1;
       break;
    }     case = \"taught\" : {        $website = lifetime;        break;     } } [/span][!--PHP-Foot--][/div][!--PHP-EFoot--] The lazy never learn. The lazy are the downfall of many great things. Take the time to learn.

#6 effigy

effigy
  • Staff Alumni
  • Advanced Member
  • 3,600 posts
  • LocationIL

Posted 01 February 2003 - 12:25 AM

add the email to the insert? :shock:
Regexp | Unicode Article | Letter Database
/\A(e)?((1)?ff(?:(?:ig)?y)?|f(?:ig)?)\z/

#7 DarthViper3k

DarthViper3k
  • Members
  • PipPipPip
  • Advanced Member
  • 50 posts

Posted 01 February 2003 - 12:29 AM

add the email to the insert?  :shock:


yea
I didn\'t notice it till after I posted the code already

lol
talk bout being blind
no wonder I wear glasses
LOL
[!--PHP-Head--][div class=\'phptop\']PHP[/div][div class=\'phpmain\'][!--PHP-EHead--]
switch($php) {
    case = \"given\" : {
       $website = 1;
       break;
    }     case = \"taught\" : {        $website = lifetime;        break;     } } [/span][!--PHP-Foot--][/div][!--PHP-EFoot--] The lazy never learn. The lazy are the downfall of many great things. Take the time to learn.

#8 metalblend

metalblend
  • Members
  • PipPipPip
  • Advanced Member
  • 89 posts
  • LocationCalifornia, USA

Posted 01 February 2003 - 05:56 AM

Glad you/we figured it out.




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users