Jump to content
Latest News: (loading..)
fantomen

Admin-Configuration-My store How to add zones? FROZEN: osCommerce Online Merchant v2.3.4.1 CE

Recommended Posts

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.

Edited by JcMagpie

 

Share this post


Link to post
Share on other sites
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

Edited by ArtcoInc

If you are running the "official" osC 2.3.4 or 2.3.4.1 download, your installation is obsolete! Get the latest community-supported responsive "Frozen" release here

Share this post


Link to post
Share on other sites

MrPhil wrote this answer to me:

Do one of two things:

  1. Omit 'zone_id' and '' from the two lists, or
  2. 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.

Share this post


Link to post
Share on other sites

Many thanks to ArtcoInc too, I just seen your reply after I wrote above answer.
Now it is working fine.

Share this post


Link to post
Share on other sites

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.

Edited by MrPhil

If you are running the "official" osC 2.3.4 or 2.3.4.1 download, your installation is obsolete! Get (stable) Frozen or (unstable) Edge. See also the naming convention and the latest community-supported responsive "Edge" release

Share this post


Link to post
Share on other sites

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.


This is a signature that appears on all my posts.  
IF YOU MAKE A POST REQUESTING HELP...please state the exact version
of osCommerce that you are using. THANKS

 
Get the latest current code (community-supported responsive 2.3.4.1BS Edge) here

 

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×