Database Help

adamdemerlis <[email protected]>
Newsgroups gmane.comp.web.oscommerce.features
Message-ID <9286d468d01cfdf5a8d56251ecce1a2c@osCommerce-Forums>
This message was sent from: Features
http://forums.oscommerce.com/viewtopic.php?p=192867#192867
----------------------------------------------------------------

Those replies were helpful however they did not do exactly what I had in mind.  I will make my request clearer: I need to change the following database query to grab random product from the sql database -

  $new_products_query = tep_db_query("select p.products_id, pd.products_name, p.products_image, p.products_tax_class_id, IF(s.status, s.specials_new_products_price,p.products_price) as products_price from " . TABLE_PRODUCTS . " p, " . TABLE_PRODUCTS_DESCRIPTION . " pd, " . TABLE_CATEGORIES . " c, " . TABLE_PRODUCTS_TO_CATEGORIES . " p2c left join " . TABLE_SPECIALS . " s on p.products_id = s.products_id where products_status = '1' and p.products_id = pd.products_id and pd.language_id = '" . $languages_id . "' and p.products_id = p2c.products_id and p2c.categories_id = c.categories_id and s.status = '1' order by p.products_date_added DESC, pd.products_name limit " . MAX_DISPLAY_NEW_PRODUCTS);


I hope someone can help.

Adam
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.