Andybird Posted March 3, 2007 Posted March 3, 2007 Hi, I have 2 websites, using the same database, the only difference is that each site has its own categories table: table_categories_site1 and table_categories_site2. Some of the products are assigned to categories from categories_site1 and others to categories from categories_site2. The idea is that when I go to products_new.php on site 1, I would like to get listed only the products that are assigned to the categories of site 1. Same for site 2. Someone could tell me how I can modify this query : $products_new_query_raw = "select p.products_id, pd.products_name, p.products_image, p.products_price, p.products_tax_class_id, p.products_date_site2, m.manufacturers_name from " . TABLE_PRODUCTS . " p left join " . TABLE_MANUFACTURERS . " m on (p.manufacturers_id = m.manufacturers_id), " . TABLE_PRODUCTS_DESCRIPTION . " pd where p.products_status = '1' and p.products_id = pd.products_id and pd.language_id = '" . (int)$languages_id . "' order by p.products_date_site2 DESC, pd.products_name"; …coming from products_new.php in order to get what I need? Thanks, Andybird
Recommended Posts
Archived
This topic is now archived and is closed to further replies.