You have to search for pieces of the SQL query that it's quoting in order to find the PHP file where it was initiated from.
I suspect your first one comes from /includes/modules/pages/index/main_template_vars.php on line 145:[FONT="Courier New"] $listing_sql = "select " . $select_column_list . " p.products_id, p.manufacturers_id, p.products_price, p.products_tax_class_id, IF(s.status = '1', s.specials_new_products_price, NULL) as specials_new_products_price, IF(s.status ='1', s.specials_new_products_price, p.products_price) as final_price from (" . TABLE_PRODUCTS_DESCRIPTION . " pd, " . TABLE_PRODUCTS . " p left join " . TABLE_MANUFACTURERS . " m on p.manufacturers_id = m.manufacturers_id, " . TABLE_PRODUCTS_TO_CATEGORIES . " p2c left join " . TABLE_SPECIALS . " s on p.products_id = s.products_id ) where p.products_status = '1' and p.products_id = p2c.products_id and pd.products_id = p2c.products_id and pd.language_id = '" . (int)$_SESSION['languages_id'] . "' and p2c.categories_id = '" . (int)$current_category_id . "'";
[/FONT]
And if you're using a newer version of MySQL, you'll need bandage things by putting parentheses around the table names .... ie: after the word "from" add a "(" and before the word "where" add a ")", as shown in the above code snippet.
You could probably get around these issues if your host were to change their MySQL settings so that the sql-mode does NOT include the "STRICT_TRANS_TABLES" option. But, if as you say, your host is being uncooperative, that's probably not an option for you.
Your second SQL query that you mentioned is related to a bug in your old code. A fix was posted here:
http://www.zen-cart.com/forum/showpo...05&postcount=4
And ... test test test test test !!!
Bookmarks