Guest Posted March 16, 2004 Share Posted March 16, 2004 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 '{3}29' at line 1 select * from products as p, products_description as pd where p.products_id = pd.products_id and pd.products_id = 73{3}29 [TEP STOP] The above is my error, and it only occurs when clicking in the "shopping cart" box on an item which has attributes attached to it. Items which do not have product attributes do not error when clicked on them. Running: MS2, PHP 4.3.2, Zend 1.3.0 Can't figure this one out, doesn't help that I don't know enough about MySQL. Any help would be much appreciated. My Webpage Link to comment Share on other sites More sharing options...
user99999999 Posted March 17, 2004 Share Posted March 17, 2004 Hi, Thats not a good bug to have, it came form infobox skin manager. catalog/includes/skin_top.php Change this $prod_name_query = tep_db_query("select * from " . TABLE_PRODUCTS . " as p, " . TABLE_PRODUCTS_DESCRIPTION . " as pd where p.products_id = pd.products_id and pd.products_id = " . $HTTP_GET_VARS['products_id']); To this $prod_name_query = tep_db_query("select products_description from " . TABLE_PRODUCTS_DESCRIPTION . " where products_id = '" . (int)$HTTP_GET_VARS['products_id'] . "' and language_id = '" . (int)$languages_id . "'"); There was several problems with that SQL query but the problem causing your error was the missing (int) before $HTTP_GET_VARS['products_id'] Link to comment Share on other sites More sharing options...
Guest Posted March 18, 2004 Share Posted March 18, 2004 YES! That is the fix. Thank you very much for your response and the code to replace the bug with. Dave, If ya ever need t-nuts..... :) --Jeff Link to comment Share on other sites More sharing options...
user99999999 Posted March 18, 2004 Share Posted March 18, 2004 Actually I think you can comment out that section. It was to put the description in the header of the box, but you already have it inside the box. Link to comment Share on other sites More sharing options...
Guest Posted March 18, 2004 Share Posted March 18, 2004 Is that line of code not needed to display (correctly) the items in your cart box? Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.