Print Page | Close Window

Random Order featured Products

Printed From: ProductCart E-Commerce Solutions
Category: ProductCart
Forum Name: Customizing ProductCart
Forum Description: Exchange messages with other users that are customizing ProductCart.
URL: https://forum.productcart.com/forum_posts.asp?TID=448
Printed Date: 27-November-2024 at 7:58am
Software Version: Web Wiz Forums 12.04 - http://www.webwizforums.com


Topic: Random Order featured Products
Posted By: dwatch
Subject: Random Order featured Products
Date Posted: 09-September-2006 at 6:55pm

I replaced the "order by pcprod_OrdInHome asc" with

order by NEW(ID)"

in the sql query that pulls featured products to display them on home.asp.  The goal of course is to randomly show featured products.  Anyone have an idea why i am getting an error?

 

Here is my new sql query:

 

query="SELECT distinct products.idProduct,products.sku,products.description,product s.price,products.listPrice,products.listHidden,products.serv iceSpec,products.listPrice,products.bToBPrice,products.small ImageUrl, products.pcprod_HideBTOPrice,products.noprices,products.stoc k,products.noStock,products.formQuantity,products.pcProd_Bac kOrder,pcprod_OrdInHome FROM products,categories_products,categories WHERE products.active=-1 AND products.showInHome=-1 AND products.configOnly=0 AND products.removed=0 AND formQuantity = 0 AND categories_products.idProduct=products.idProduct AND categories.idCategory=categories_products.idCategory AND categories.iBTOhide=0 " & query1 & " order by NEWID()"




Print Page | Close Window

Forum Software by Web Wiz Forums® version 12.04 - http://www.webwizforums.com
Copyright ©2001-2021 Web Wiz Ltd. - https://www.webwiz.net