Quote Originally Posted by Ajeh View Post
Is your database setup with tables that use the prefixes or is it setup without the prefixes?

Your code appears to have mixed settings and you need to first determine which is correct ...

Then, you will need to find the code that is not using the tables correctly ...

A search in the Developers Tool Kit for the word:
UNION

Zen Cart, by default, does not use UNION on its tables in v1.3.9 ... so a search on that word should help narrow down where that code is used and then you can fix it with the proper calls to the database tables ...
Hi Ajeh,

Thanks for your help. The database is setup with the prefixes. Searched for UNION and found these. What do we do next?

/includes/modules/YOUR_TEMPLATE/cart_upsell.php

Line #34 : $xsell_query_raw .= "(select p.products_id, p.products_image from " . TABLE_PRODUCTS_XSELL . " xp, " . TABLE_PRODUCTS . " p, " . TABLE_PRODUCTS_DESCRIPTION . " pd where xp.products_id = '" . $prod[$i] . "' and xp.xsell_id = p.products_id and p.products_id = pd.products_id and pd.language_id = '" . $_SESSION['languages_id'] . "' and p.products_status = '1' order by xp.products_id asc limit " . $extra . ") UNION ";

Line #91 : and p.products_status = '1' group by p.products_id order by o.date_purchased desc limit " . $extra . ") UNION ";