MySQL Development
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
 
User Name:
Password:
Remember me
 
Go Back   Dev Articles Community ForumsDatabasesMySQL Development

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Display Modes
 
Unread Dev Articles Community Forums Sponsor:
Stay one step ahead of the competition. Evaluate and give feedback on some of the hottest web development tools on the market today. Make your opinion heard! Click Here
  #1  
Old February 14th, 2003, 04:33 PM
littleblackdog littleblackdog is offline
Contributing User
Dev Articles Newbie (0 - 499 posts)
 
Join Date: Apr 2002
Location: Anchorage
Posts: 118 littleblackdog User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 7
Mysql giving strange error

I have been writing to a Mysql database with no problems, until now. It is giving me, " Duplicate entry '127' for key 1 " error. I went into the Cpanel admin. that comes with phpmyadmin and looked at the database, it has 127 entries, all look fine. The ID is tinyint(4) and set to auto_increment. Now it seems to hit the number 127 and stop. I deleted row 127 and was able to add another, but now again, at 127, I'm stuck. Any idea whats going on?
__________________
bow wow!

Reply With Quote
  #2  
Old February 14th, 2003, 07:19 PM
laidbak laidbak is offline
you know how we do
Dev Articles Novice (500 - 999 posts)
 
Join Date: Jun 2002
Location: In Tha IE -- San Bernardino COUNTY
Posts: 788 laidbak User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 2 h 4 m 2 sec
Reputation Power: 7
Send a message via ICQ to laidbak Send a message via AIM to laidbak Send a message via MSN to laidbak Send a message via Yahoo to laidbak
Its quite simple:
You need to change the column type if you plan to use more than 127 rows.

The tinyint field limits you to 127.

Take a look at the manual:
http://www.mysql.com/documentation/...l#Numeric_types


TINYINT[(M)] [UNSIGNED] [ZEROFILL]
A very small integer. The signed range is -128 to 127. The unsigned range is 0 to 255.

Always remember to reference the manual before making column / type, etc decisions.

It will help you in the long run,

Best Regards,

--
Wil Moore III
www.wilmoore.com

Reply With Quote
Reply

Viewing: Dev Articles Community ForumsDatabasesMySQL Development > Mysql giving strange error


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


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

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump


Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 





© 2003-2008 by Developer Shed. All rights reserved. DS Cluster 6 hosted by Hostway