Guest ben1390 Posted October 4, 2010 Share Posted October 4, 2010 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 Quote Link to comment Share on other sites More sharing options...
kinetic Posted October 4, 2010 Share Posted October 4, 2010 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 Quote Link to comment Share on other sites More sharing options...
Guest ben1390 Posted October 4, 2010 Share Posted October 4, 2010 Thanks, it was because i had quotes in the product title, this is now solved Quote Link to comment Share on other sites More sharing options...
vokf Posted October 4, 2010 Share Posted October 4, 2010 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 Quote Link to comment Share on other sites More sharing options...
kinetic Posted October 5, 2010 Share Posted October 5, 2010 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 Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.