Database Forum
Web Database Register Members List Calendar FAQ

 
Go Back   Database Forum > PHPMagic Discussions > General questions
User Name
Password

Reply
 
Thread Tools Search this Thread Display Modes
Default Error Message
01-08-2009, 03:30 PM #1  

mwalkerbcc
Junior Member

 
Status: Offline
Posts: 9
Join Date: Jan 2009

When I try to input new values I get this:

SQL error:

Query:
insert into Tee_Details (Tee_ID, Tee_Name, Hole, Yards, Par, Hole_HDCP) values ('00001', '0000001', '2', '446', '4', '8')

Duplicate entry '00000' for key 1

I know it has to do with the first two values but is there a way I can keep both values and not get the error message. Sorry Newbie!
Reply With Quote

Default
01-12-2009, 11:01 AM #2  

SusanH
Senior Member

 
Status: Offline
Posts: 115
Join Date: Mar 2005
Location: CA

It could be that you have a field that's set to auto_increment this will make the number 1, 2, 3, etc etc. OR it could be a field that's set to unique, just remove it from being unique. Without understanding your table structure and how you expect it to work it is difficult to diagnose.
Reply With Quote

Default Auto Increment
01-13-2009, 06:12 PM #3  

mwalkerbcc
Junior Member

 
Status: Offline
Posts: 9
Join Date: Jan 2009

Is there any way to make auto increment (I have two fields in my db on AI) start at a number like one starts at 100001 and another starts at 20001 so they don't duplicate? Thanks.
Reply With Quote

Default
01-14-2009, 05:31 AM #4  

clifford
Senior Member

 
Status: Offline
Posts: 266
Join Date: Mar 2005
Location: San Fran, CA

mysql> ALTER TABLE tbl AUTO_INCREMENT = 1000;
Reply With Quote

Default
01-18-2009, 02:23 AM #5  

wt1099
Junior Member

 
Status: Offline
Posts: 1
Join Date: Jan 2009

it could be a field that's set to unique, just remove it from being unique Is there any way to make auto increment (I have two fields in my db on AI) start at a number like one starts at 100001 and another starts at 20001 so they don't duplicate?
Reply With Quote

Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump



All times are GMT -5. The time now is 10:55 AM.

Powered by: vBulletin Version 3.7.4
Copyright ©2000 - 2013, Jelsoft Enterprises Ltd.
Database Forums

Help support our forum assistants and product development ->

go to top go to top