Guest Posted November 30, 2005 Share Posted November 30, 2005 I found 2 different mods i want to imply in my cart, but i can't get them work together. I want the categories to be in alphabetical order and have them display the number of products beside them: these changes were made to /include/boxes/categories.inc.php Mod#1 (# of products) $results = $db->select("SELECT cat_name, cat_id, noProducts FROM ".$glob['dbprefix']."CubeCart_category WHERE cat_father_id = 0"); Mod#2 (Alpha) $results = $db->select("SELECT cat_name, cat_id FROM ".$glob['dbprefix']."CubeCart_category WHERE cat_father_id = 0 ORDER BY cat_name ASC"); Combo String that doesn't work: $results = $db->select("SELECT cat_name, cat_id, noProducts FROM ".$glob['dbprefix']."CubeCart_category WHERE cat_father_id = 0"); Error:Parse error: parse error, unexpected '[' in /home/stiener/public_html/lindamaysgiftbaskets/cart/includes/boxes/categories.inc.php on line 37 What am i doing wrong? Please help, thank you. Danny Quote Link to comment Share on other sites More sharing options...
Guest estelle Posted November 30, 2005 Share Posted November 30, 2005 Danny, I can't see any parse errors in the "combo string" code you posted, so I expect the error may be occuring on a different line in the file. Please double check what code occurs on line 37. This is the correct merge for the two lines of code is: $results = $db->select("SELECT cat_name, cat_id, noProducts FROM ".$glob['dbprefix']."CubeCart_category WHERE cat_father_id = 0 ORDER BY cat_name ASC"); Estelle. Quote Link to comment Share on other sites More sharing options...
Guest Posted December 1, 2005 Share Posted December 1, 2005 That worked. Thank you so much. Danny Quote Link to comment Share on other sites More sharing options...
Guest estelle Posted December 1, 2005 Share Posted December 1, 2005 No worries :lol: 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.