General question concerning data in MySQL using any app?

[expired user #1919]'s profile image [expired user #1919] posted 17 years ago in General Permalink
This is a general question due to the fact that I have a table that has to be related to another table like this:
Province table:
provinceid = autoincrement tinyint(3)
province = varchar(50)

City table:
cityid = autoincrement tinyint(3)
city = varchar(50)
provinceid = tinyint(3)

My issue is that I have 127 rows of data in the city table and can't add anymore.
Is this a problem in MySQL or is there something wrong with my system?
Any ideas or where or how to fix this error:
#1264 - Out of range value adjusted for column 'cityid' at row 1
[expired user #1821]'s profile image [expired user #1821] posted 17 years ago Permalink
You have created an auto_increment column as TINYINT(3): this can not exceed 127 (when it's signed, unsigned it could go up until 255)
So, change the type to, for example INT(11)

edit
see also:
http://dev.mysql.com/doc/refman/5.1/en/numeric-type-overview.html
[expired user #1919]'s profile image [expired user #1919] posted 17 years ago Permalink
Now I get a range check error.
I changed it unsigned INT(11) but no luck.
It is a MYISAM table type
[expired user #1919]'s profile image [expired user #1919] posted 17 years ago Permalink
It works in PHPmyADMIN but not in HeidSQL, error

Thanks
Cheers
[expired user #1821]'s profile image [expired user #1821] posted 17 years ago Permalink
If it doesn't appear to be working in HeidiSQL it might also be because either you're not applying it right or because you're working with a cached version of the data. When you go to the data-grid, Heidi reads the table-specifications and gives feedback accordingly. When you go to another tab (query for example) and then back again to Data, it won't read the table-specs again, but uses what it already knows (at least: it seems to work that way to me..). So maybe all you have to do is a refresh.
If it still gives an error show me what SHOW CREATE TABLE citytable gives you
[expired user #1919]'s profile image [expired user #1919] posted 17 years ago Permalink
Sorry forgot to reply to say it is working.

Thanks again.

Please login to leave a reply, or register at first.