Jump to content

MySQL 1064 Error


Guest ben1390

Recommended Posts

Guest ben1390

Hi, I am getting this error when trying to add a new product, any ideas wha it might be? Any help would be much appreciated

Error Message:

1064: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'DTJR226'' at line 1



SQL:

SELECT `productId` FROM `CubeCart_inventory` WHERE `productCode` = 'IT'DTJR226'




Server Config:




CubeCart Version: 4.4.2

PHP Version: 5.2.13

MySQL Version: 5.1.50

Image upload folder size: 6 MB

Server Software: Apache mod_fcgid/2.3.5 mod_auth_passthrough/2.1 mod_bwlimited/1.4 FrontPage/5.0.2.2635

Client Browser: Mozilla/5.0 (Windows; U; Windows NT 6.1; en-GB; rv:1.9.2.10) Gecko/20100914 Firefox/3.6.10

Link to comment
Share on other sites

looks like you are getting that error because you are using a single quote in your product code

Ive found that single or double quotes in product title or product code will throw all kinds of errors we tend to stick with the ` accent for use as an apostrophe in product titles

a single quote ' in a product code would definetly throw an error

Link to comment
Share on other sites

Thanks, it was because i had quotes in the product title, this is now solved

This shouldn't be a problem if in admin product, all the inventory queries use mySQLSafe to clean the variable (product title in this case) - do you have 3rd party mods installed or a very old version of CC4?

Jason

Link to comment
Share on other sites

Thanks, it was because i had quotes in the product title, this is now solved

This shouldn't be a problem if in admin product, all the inventory queries use mySQLSafe to clean the variable (product title in this case) - do you have 3rd party mods installed or a very old version of CC4?

Jason

Jason thats not true CCv4 does not seem to safe the product title or product code because this error shows up on stock cubecart stores w/o any mods Ive seen it time and time again

cant use ' or " quotes in product titles or product codes also cant use & in product titles or if it is mysqlSafe the product title or product code fields its not doing it right

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...