RE: [PHP] can anyone explain this error ?

2002-01-23 Thread Rick Emery

It means you are trying to insert 22 values into 20 fields

-Original Message-
From: Matthew Darcy [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, January 23, 2002 4:11 PM
To: PHP developers
Subject: [PHP] can anyone explain this error ?


I am doing an insert into a EMPTY mysql table.
1 field is an auto increment.

here is the error I get when I do the insert

Column count doesn't match value count at row 1

What does this mean ?

Here is the php used to insert it.

?php

include(../dbconnect.php);

if ($submit == sign!)
{
$query = insert into account_details
(account_number, account_type, account_name,
account_address, account_addres1, account_address2, account_address3,
account_address4, account_address5, account_contact, account_phone,
account_fax, account_email, account_start_date, account_authorised_credit,
account_pin, account_disabled_flag, metered_jobs, unmetered_jobs,
account_pin_activate) values
('$account_number', '$account_type', '$account_name', '$account_house',
'$account_street', '$account_street1', '$account_street2', '$account_town',
'$account_city', '$account_postcode', '$account_country',
'$account_contact', '$account_phone', '$account_fax', '$account_email',
'$account_start', '$account_credit_authorised', '$account_pin',
'$account_disabled_flag', '$metered_job_count', '$unmetered_job_count',
'$account_pin_activated');

mysql_query($query) or
die (mysql_error());
?

H2 Data Submitted /H2
H2 A HREF=view_test_records.php View the records /A/H2
?php
}
else
{
include(datafillcommit.php);
}
?
~

Thanks,

Matt.


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




Re: [PHP] can anyone explain this error ?

2002-01-23 Thread Richard Baskett

Basically you're trying to add more values into the table than columns
specified.  You have 22 values and only 20 columns specified in your $query.

Rick

Finish each day and be done with it. You have done what you could; some
blunders and absurdities have crept in; forget them as soon as you can.
Tomorrow is a new day; you shall begin it serenely and with too high a
spirit to be encumbered with your old nonsense. - Ralph Waldo Emerson

 From: Matthew Darcy [EMAIL PROTECTED]
 Reply-To: [EMAIL PROTECTED]
 Date: Wed, 23 Jan 2002 22:10:30 -
 To: PHP developers [EMAIL PROTECTED]
 Subject: [PHP] can anyone explain this error ?
 
 I am doing an insert into a EMPTY mysql table.
 1 field is an auto increment.
 
 here is the error I get when I do the insert
 
 Column count doesn't match value count at row 1
 
 What does this mean ?
 
 Here is the php used to insert it.
 
 ?php
 
 include(../dbconnect.php);
 
 if ($submit == sign!)
 {
   $query = insert into account_details
   (account_number, account_type, account_name,
 account_address, account_addres1, account_address2, account_address3,
 account_address4, account_address5, account_contact, account_phone,
 account_fax, account_email, account_start_date, account_authorised_credit,
 account_pin, account_disabled_flag, metered_jobs, unmetered_jobs,
 account_pin_activate) values
 ('$account_number', '$account_type', '$account_name', '$account_house',
 '$account_street', '$account_street1', '$account_street2', '$account_town',
 '$account_city', '$account_postcode', '$account_country',
 '$account_contact', '$account_phone', '$account_fax', '$account_email',
 '$account_start', '$account_credit_authorised', '$account_pin',
 '$account_disabled_flag', '$metered_job_count', '$unmetered_job_count',
 '$account_pin_activated');
 
 mysql_query($query) or
   die (mysql_error());
 ?
 
 H2 Data Submitted /H2
 H2 A HREF=view_test_records.php View the records /A/H2
 ?php
 }
 else
 {
 include(datafillcommit.php);
 }
 ?
 ~
 
 Thanks,
 
 Matt.
 
 
 -- 
 PHP General Mailing List (http://www.php.net/)
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 To contact the list administrators, e-mail: [EMAIL PROTECTED]
 


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




RE: [PHP] can anyone explain this error ?

2002-01-23 Thread Matthew Darcy

gents,

thanks. I have been working hard on this php thing for a couple of days now
from setup to starting development. Today a couple of glitches have
slipped past me. I think I am tired and been working on this for too long
with out a break.

thanks for pointing out the errors.

Out of interest does this error normally mean this error or did you gather
this from counting the code.

Thanks,

Matt.


-Original Message-
From: Richard Baskett [mailto:[EMAIL PROTECTED]]
Sent: 23 January 2002 22:22
To: [EMAIL PROTECTED]; PHP General
Subject: Re: [PHP] can anyone explain this error ?


Basically you're trying to add more values into the table than columns
specified.  You have 22 values and only 20 columns specified in your $query.

Rick

Finish each day and be done with it. You have done what you could; some
blunders and absurdities have crept in; forget them as soon as you can.
Tomorrow is a new day; you shall begin it serenely and with too high a
spirit to be encumbered with your old nonsense. - Ralph Waldo Emerson

 From: Matthew Darcy [EMAIL PROTECTED]
 Reply-To: [EMAIL PROTECTED]
 Date: Wed, 23 Jan 2002 22:10:30 -
 To: PHP developers [EMAIL PROTECTED]
 Subject: [PHP] can anyone explain this error ?

 I am doing an insert into a EMPTY mysql table.
 1 field is an auto increment.

 here is the error I get when I do the insert

 Column count doesn't match value count at row 1

 What does this mean ?

 Here is the php used to insert it.

 ?php

 include(../dbconnect.php);

 if ($submit == sign!)
 {
   $query = insert into account_details
   (account_number, account_type, account_name,
 account_address, account_addres1, account_address2, account_address3,
 account_address4, account_address5, account_contact, account_phone,
 account_fax, account_email, account_start_date, account_authorised_credit,
 account_pin, account_disabled_flag, metered_jobs, unmetered_jobs,
 account_pin_activate) values
 ('$account_number', '$account_type', '$account_name', '$account_house',
 '$account_street', '$account_street1', '$account_street2',
'$account_town',
 '$account_city', '$account_postcode', '$account_country',
 '$account_contact', '$account_phone', '$account_fax', '$account_email',
 '$account_start', '$account_credit_authorised', '$account_pin',
 '$account_disabled_flag', '$metered_job_count', '$unmetered_job_count',
 '$account_pin_activated');

 mysql_query($query) or
   die (mysql_error());
 ?

 H2 Data Submitted /H2
 H2 A HREF=view_test_records.php View the records /A/H2
 ?php
 }
 else
 {
 include(datafillcommit.php);
 }
 ?
 ~

 Thanks,

 Matt.


 --
 PHP General Mailing List (http://www.php.net/)
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 To contact the list administrators, e-mail: [EMAIL PROTECTED]



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]