♥JcMagpie Posted February 4, 2019 Share Posted February 4, 2019 Backing up is free takes seconds, I do it before every step change to db that way you can step back if you mess up. Link to comment Share on other sites More sharing options...
fantomen Posted February 4, 2019 Author Share Posted February 4, 2019 Ok thank you for this information. Link to comment Share on other sites More sharing options...
fantomen Posted February 4, 2019 Author Share Posted February 4, 2019 I found this link on the internet. Seems to have a similar issue like me?https://stackoverflow.com/questions/2536199/1366-incorrect-integer-valuemysql Link to comment Share on other sites More sharing options...
♥JcMagpie Posted February 4, 2019 Share Posted February 4, 2019 Sure as I said it's an issue with your db proper fix in in the .ini file which your host will be able to do. Or backup and give Phil's thing a shot! The test I did was using CE Frozen on PHP 7.2 and MySQL 5.1.73 From what little I know that error normaly happens on a db which moves from MySQL 4 to 5 but as I said I don't know much so play safe. Link to comment Share on other sites More sharing options...
ArtcoInc Posted February 4, 2019 Share Posted February 4, 2019 33 minutes ago, fantomen said: I tried changed this line: INSERT INTO zones (zone_id, zone_country_id, zone_code, zone_name) VALUES ('',203,'AB','Stockholm') To this line: INSERT INTO zones (null, zone_country_id, zone_code, zone_name) VALUES ('',203,'AB','Stockholm') @fantomen You don't want to change the database fields, you want to change the value of the data you are inserting into the fields. I think what @MrPhil was suggesting is this: INSERT INTO zones (zone_id, zone_country_id, zone_code, zone_name) VALUES ('null',203,'AB','Stockholm') 1) Back up, back up, back up! 2) I do not know if the 'null' data needs to be surrounded by single quotes or not. Probably not. You may have to try either or both. 3) You will have to make this change to all of the records you are inserting into the database. HTH M Link to comment Share on other sites More sharing options...
fantomen Posted February 4, 2019 Author Share Posted February 4, 2019 MrPhil wrote this answer to me: Do one of two things: Omit 'zone_id' and '' from the two lists, or Replace '' with null One of them should work. zone_id is autoincrement, so omitting it or giving null should increment it to the next value. NOW I GOT IT WORKING WHEN I WROTE THIS CODE LINE: INSERT INTO zones (zone_id, zone_country_id, zone_code, zone_name) VALUES (null,203,'AB','Stockholm')MANY THANKS TO MrPhil and JcMagpie for helping me to solve this issue. Link to comment Share on other sites More sharing options...
fantomen Posted February 4, 2019 Author Share Posted February 4, 2019 Many thanks to ArtcoInc too, I just seen your reply after I wrote above answer. Now it is working fine. Link to comment Share on other sites More sharing options...
MrPhil Posted February 4, 2019 Share Posted February 4, 2019 null is a special keyword with a special meaning. It does not get quotes around it, nor is it capitalized. Some older versions of MySQL may have allowed '' instead of null. Link to comment Share on other sites More sharing options...
burt Posted February 5, 2019 Share Posted February 5, 2019 You could also have just done it via the Admin, as Sweden only has a few Zones; Admin > Locations/Taxes > Zones > {Add New Zone} Answer given for future reference of people finding this thread. Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.