RE: [PHP-DB] multiple entries in database
| From: | Rick Emery | Date: | Fri, 08 Feb 2002 15:44:24 +0000 |
| Subject: | RE: [PHP-DB] multiple entries in database | ||
| Groups: | php.db | ||
| Request: | Send a blank email to php-db+get-16693@lists.php.net to get a copy of this message | ||
Show us you table data
Show your PHP code as well
-----Original Message-----
From: Justin Hall [mailto:jhalljhall@yahoo.com]
Sent: Friday, February 08, 2002 12:06 AM
To: php-db@lists.php.net
Subject: [PHP-DB] multiple entries in database
I have worked my problem down to the mysql database.
I have a table like so:
Field
Type
Attributes
Null
Default
Extra
username
varchar(16)
No
commID
int(9)
No
auto_increment
commState
char(2)
No
commCity
varchar(25)
No
commZip
int(5)
No
0
commName
varchar(255)
No
commID is primaryKey.
when I do an insert to this table without giving the ID a value inside
the insert statement it duplicates the entry or increments another blank
entry.
the insert statement is not in a loop or recursive function.
I have found out that if I take out the auto_increment that it adds it
just fine if the ID value is added to the statement..without the ID
value it enters the ID as '0'.
I have another insert statement with another table that is doing the
exact same thing.
I'm kinda new and kinda not..so..any help is appreciated..
Justin Hall
JD Media
www.jdmedia.net
jdh@jdmedia.net