craigfh Posted December 1, 2007 Share Posted December 1, 2007 Here is the error I get when utilizing the - Rebuild category product count.. MySQL Error Occured 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 'SELECT DISTINCT cat_id FROM CubeCart_cats_idx WHERE 1) GROUP BY SQL: SELECT COUNT(cat_id) as count, cat_id FROM CubeCart_cats_idx WHERE cat_id IN(SELECT DISTINCT cat_id FROM CubeCart_cats_idx WHERE 1) GROUP BY cat_id Any ideas how to fix this? Quote Link to comment Share on other sites More sharing options...
Guest Posted December 3, 2007 Share Posted December 3, 2007 Check your MySQL version. Chances are you're not meeting the software's minimum requirements. Talk to your hosting company. The requirements are not out of the norm....so your host may be running old stuff. :sourcerer: Quote Link to comment Share on other sites More sharing options...
craigfh Posted December 3, 2007 Author Share Posted December 3, 2007 Our version we are running is 4.0.25 which should be fine. I don't believe that could be the issue since everything else works fine. Plus I noticed the issue after I upgraded from 4.0.3 to the orc version. thanks Craig Check your MySQL version. Chances are you're not meeting the software's minimum requirements. Talk to your hosting company. The requirements are not out of the norm....so your host may be running old stuff. Quote Link to comment Share on other sites More sharing options...
Guest Posted December 4, 2007 Share Posted December 4, 2007 I also am having the same problem with "Rebuild category product count". My setup shows fine and is as follows: CubeCart 4 Requirements Test Ioncube Loader: Not Available Zend Optimizer: Installed GD Image Library: Version 2 PHP ≥ 4.3.0: 5.2.4 MySQL ≥ 4.1.0: 4.1.10 Congratulations. Your server is compatible with CubeCart v4 The error message is: MySQL Error Occured 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 'SELECT DISTINCT cat_id FROM CubeCart_cats_idx WHERE 1) GROUP BY SQL: SELECT COUNT(cat_id) as count, cat_id FROM CubeCart_cats_idx WHERE cat_id IN(SELECT DISTINCT cat_id FROM CubeCart_cats_idx WHERE 1) GROUP BY cat_id Quote Link to comment Share on other sites More sharing options...
Guest BIG Management Posted December 28, 2007 Share Posted December 28, 2007 Can someone out there help adjust the SQL that is being called to accomplish the same thing ... Original: SELECT COUNT(cat_id) as count, cat_id FROM st1_CubeCart_cats_idx WHERE cat_id IN(SELECT distinct cat_id FROM st1_CubeCart_cats_idx WHERE 1)GROUP BY cat_id Manually running in phpmyadmin ... SELECT COUNT(cat_id) as count, cat_id FROM st1_CubeCart_cats_idx GROUP BY cat_id ...works fine. Manually running in phpmyadmin ... SELECT distinct cat_id FROM st1_CubeCart_cats_idx WHERE 1 ... works fine . But manually running them in phpmyadmin with the "IN" causes the error ... 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 'SELECT DISTINCT cat_id FROM st1_CubeCart_cats_idx WHERE 1) GROU Checking the manual does me no good - can a sql person reply with a quick fix. Thanks! Quote Link to comment Share on other sites More sharing options...
convict Posted December 28, 2007 Share Posted December 28, 2007 Can someone out there help adjust the SQL that is being called to accomplish the same thing ... Original: SELECT COUNT(cat_id) as count, cat_id FROM st1_CubeCart_cats_idx WHERE cat_id IN(SELECT distinct cat_id FROM st1_CubeCart_cats_idx WHERE 1)GROUP BY cat_id Manually running in phpmyadmin ... SELECT COUNT(cat_id) as count, cat_id FROM st1_CubeCart_cats_idx GROUP BY cat_id ...works fine. Manually running in phpmyadmin ... SELECT distinct cat_id FROM st1_CubeCart_cats_idx WHERE 1 ... works fine . But manually running them in phpmyadmin with the "IN" causes the error ... 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 'SELECT DISTINCT cat_id FROM st1_CubeCart_cats_idx WHERE 1) GROU Checking the manual does me no good - can a sql person reply with a quick fix. Thanks!What is the mySQL version? Quote Link to comment Share on other sites More sharing options...
Guest BIG Management Posted December 28, 2007 Share Posted December 28, 2007 Here are the versions I am using ... CubeCart Version: Visit the CubeCart Downloads Server4.1.0RC2 PHP Version: 4.4.7 MySQL Version: 4.0.27-standard-log Image upload folder size: 358.3 KB Server Software: Apache/1.3.33 (Unix) Client Browser: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8.1.11) Gecko/20071127 Firefox/2.0.0.11 Can someone out there help adjust the SQL that is being called to accomplish the same thing ... Original: SELECT COUNT(cat_id) as count, cat_id FROM st1_CubeCart_cats_idx WHERE cat_id IN(SELECT distinct cat_id FROM st1_CubeCart_cats_idx WHERE 1)GROUP BY cat_id Manually running in phpmyadmin ... SELECT COUNT(cat_id) as count, cat_id FROM st1_CubeCart_cats_idx GROUP BY cat_id ...works fine. Manually running in phpmyadmin ... SELECT distinct cat_id FROM st1_CubeCart_cats_idx WHERE 1 ... works fine . But manually running them in phpmyadmin with the "IN" causes the error ... 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 'SELECT DISTINCT cat_id FROM st1_CubeCart_cats_idx WHERE 1) GROU Checking the manual does me no good - can a sql person reply with a quick fix. Thanks! Quote Link to comment Share on other sites More sharing options...
convict Posted December 29, 2007 Share Posted December 29, 2007 You can't use nested SQL query because of old MySQL version. Quote Link to comment Share on other sites More sharing options...
Guest BIG Management Posted December 30, 2007 Share Posted December 30, 2007 You can't use nested SQL query because of old MySQL version. OK ... So what would be the old way of doing it without nesting them? Anyone? Thanks Quote Link to comment Share on other sites More sharing options...
convict Posted January 3, 2008 Share Posted January 3, 2008 You can't use nested SQL query because of old MySQL version. OK ... So what would be the old way of doing it without nesting them? Anyone? Thanks Temporary tables AND/OR php loop. 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.