Jump to content
  • Checkout
  • Login
  • Get in touch


The e-commerce.

products_new sql search within category


Recommended Posts

Trying to get the product_new.php to just display the products in the current category see:


As you can see the images scrolling are the ones within a certain category, but the new product displayed is not.


The sql query for products_new reads:

$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_added, 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_added DESC, pd.products_name";


but to search for products within a certain sub category does this mean i have to first search for the sub categories_id within categories and then search for the products within that sub category and then run the above sql, or can i do some really complicated inner join??


any ideas?

Link to comment
Share on other sites


This topic is now archived and is closed to further replies.

  • Create New...