Thread: Newest Products
View Single Post
  #62  
Old 09-29-2004, 08:05 PM
 
BHMedia BHMedia is offline
 

Advanced Member
  
Join Date: Sep 2003
Posts: 71
 

Default

Im not sure if this part is even worth posting but I figured it out..

I wanted to make it so it will just RANDOM the 6 products i had there... Because my client has so many updated products...

here goes

all you have to do is change the query from


Code:
$query = "SELECT * FROM $sql_tbl[products],$sql_tbl[pricing] WHERE forsale='Y' AND avail>0 AND $sql_tbl[products].productid=$sql_tbl[pricing].productid AND add_date > " . $oldtime . " AND add_date < " . $nowtime . " ORDER BY xcart_products.productID DESC LIMIT 0,5 ";

to

Code:
// the database query $query = "SELECT * FROM $sql_tbl[products],$sql_tbl[pricing] WHERE forsale='Y' AND avail>0 AND $sql_tbl[products].productid=$sql_tbl[pricing].productid AND add_date > " . $oldtime . " AND add_date < " . $nowtime . " ORDER BY RAND() LIMIT 6 ";


Hope this helps... This works for 4.03...
Reply With Quote