matchattaxoutlet Posted September 16, 2013 Share Posted September 16, 2013 Can anyone shed any light on this error message? File: [gui.class.php] Line: [914] "SELECT * FROM `cc4_CubeCart_inventory` JOIN (SELECT CEIL(RAND() * (SELECT MAX(`product_id`) FROM `cc4_CubeCart_inventory`)) AS `product_id`) AS `r` USING (`product_id`) WHERE " - 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 '' at line 1 It appeared dozens of times in the space of 5 mins. Been on to my hosting company and they said there is no problem at their end. I had a customer online at the time and his basket got wiped, he didn't come back!!! Quote Link to comment Share on other sites More sharing options...
Dirty Butter Posted September 16, 2013 Share Posted September 16, 2013 This is WAY over my head, but this looks weird: FROM `cc4_CubeCart_inventory Hopefully Bsmither or another CC expert will be along soon. Quote Link to comment Share on other sites More sharing options...
matchattaxoutlet Posted September 16, 2013 Author Share Posted September 16, 2013 Hi Dirty Butter, thanks for taking a look. I think the reference in the comment to cc4 is due to the fact my sql database is called xxxx_cc4 Are you aware of any limits on the number of items in a customers basket? On cc4 i found that if anyone added more than 250 individual items then as soon as they left the basket it would empty. A very frustrating scenario and during the time these errors appeared there was a customer online who may have added many items. This though may be totally unrelated. Quote Link to comment Share on other sites More sharing options...
Dirty Butter Posted September 17, 2013 Share Posted September 17, 2013 I'm not the one to answer your question about the basket limit. Sorry. But the fact that your database has cc4 in it certainly makes me believe it is an upgrade from v4 to v5. That may explain any odd behavior you find, so it's an important piece of information to know definitely one way or another. Quote Link to comment Share on other sites More sharing options...
bsmither Posted September 17, 2013 Share Posted September 17, 2013 This is probably the query that chooses a random product to show in the Featured Product box. The random product is chosen from all products that are in stock* and enabled*. (These restrictions are bypassed when an admin is touring the store.) If, for some reason, CubeCart has decided that no product can be shown, there will be a missing expression in the WHERE clause of the query: * Hide Out-of-Stock products * Exclude disabled products Also (but won't cause the SQL error): * Exclude products that its primary category is disabled * Product must have an image (bug) * Will try twenty times to get a product Quote Link to comment Share on other sites More sharing options...
matchattaxoutlet Posted September 17, 2013 Author Share Posted September 17, 2013 Thanks guys for your input. TBH i am convinced this is due to connection issues with my host, getting them to admit it is proving hard work. Dirty butter, you are correct in your assumption, my cubecart is an upgrade (i have it in my signature). 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.