|
|
|||||||||
|
|||||||||
|
|||||||||
| |
|||
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Display Modes |
|
|
|
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
|
|||
|
|||
|
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! |
|
#2
|
|||
|
|||
|
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 |
![]() |
| Viewing: Dev Articles Community Forums > Databases > MySQL Development > Mysql giving strange error |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|