Ads were blocked - no problem. But keep in mind that developing HeidiSQL, user support and hosting takes time and money. You may want to send a donation instead.

General question concerning data in MySQL using any app?

westmatrix's profile image westmatrix posted 14 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
siMKin's profile image siMKin posted 14 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
westmatrix's profile image westmatrix posted 14 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
westmatrix's profile image westmatrix posted 14 years ago Permalink
It works in PHPmyADMIN but not in HeidSQL, error

Thanks
Cheers
siMKin's profile image siMKin posted 14 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
westmatrix's profile image westmatrix posted 14 years ago Permalink
Sorry forgot to reply to say it is working.

Thanks again.
Code modification/commit 0e6c3c9 from ansgarbecker, 5 years ago, revision 5122
Support session name in placeholders for filename. See http://www.heidisql.com/forum.php?t=22320
Code modification/commit 5152fca from ansgarbecker, 5 years ago, revision 5124
Catch exception when clicking "Cancel running operation" and the KILL command cannot be executed. See http://www.heidisql.com/forum.php?t=22339

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




Ads were blocked - no problem. But keep in mind that developing HeidiSQL, user support and hosting takes time and money. You may want to send a donation instead.