Jump to content

MySQL 5 Compatibility Fix


Al Brookbanks

Recommended Posts

  • 2 weeks later...

The following database alteration will allow you to run CubeCart successfully on MySQL 5

ALTER TABLE `CubeCart_taxes` CHANGE `percent` `percent` DECIMAL( 7, 4 ) NOT NULL DEFAULT '0.0000'




Don't forget to add the table prefix if you have one.
Al, I don't think this is the only place where the problem is. If you try adding a new product with out setting any of the values other than product name, the insert will fail on all numeric fields. price, sale_price, stock_level and such. The problem is causedby the following setting in MySQL v5 my.ini file:

Commenting out the above setting resolves this problem.

Many CubeCart operators will not be able to change this setting. I belive the only "correct" solution to this issue is placing default values for numberic fields into the code and not relying on the defaults of the database tables.

The above is only my opinion.

Thank you for your support

/Goober

# Set the SQL mode to strict

sql-mode="STRICT_TRANS_TABLES,NO_AUTO_CREATE_USER,NO_E NGINE_SUBSTITUTION"
Link to comment
Share on other sites

  • 6 months later...
Guest lcools

Hello Goober,

My host's server is being updated to MySQL v5 on March 12th. I'd like to make these changes but I have little experience with databases and do not understand much of the terminology.

Would you (or anyone) be able to explain how I can either set the "comment out the setting below" or "place default values for numberic fields into the code"?

Sorry, I'm a bit off a mysql nube, but I will try to understand.

Leila

I don't think this is the only place where the problem is. If you try adding a new product with out setting any of the values other than product name, the insert will fail on all numeric fields. price, sale_price, stock_level and such.

The problem is causedby the following setting in MySQL v5 my.ini file:

# Set the SQL mode to strict

sql-mode="STRICT_TRANS_TABLES,NO_AUTO_CREATE_USER,NO_E NGINE_SUBSTITUTION"

Commenting out the above setting resolves this problem.

Many CubeCart operators will not be able to change this setting. I belive the only "correct" solution to this issue is placing default values for numberic fields into the code and not relying on the defaults of the database tables.

Link to comment
Share on other sites

  • 1 year later...
Guest comptime

From the sound of this topic, this may explain why my store has been acting a little weird. My web host upgraded to MySQL 5 and now when I go to add a product it lets me add everything, but when I go to upload the image, it uploads the image okay, but it doesn't refresh the page afterwards like its supposed and show me the image. Also when I finish entering all the information, and I click add product, it puts everything in my database, but the information about the image. This means that I have to go into my database through phpmyadmin and manually look up the product and give it the information.

Does this sound like a compatibility issue to you, because if so I need to know of a way to fix this. I'm running CubeCart 3.0.15 if that helps anyone. Thanks

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...