Featured Products
<%
'Get Fetured Products
mySQL="SELECT idProduct,description,descriptionLong," _
& " listPrice,price,smallImageUrl,stock," _
& " fileName,noShipCharge " _
& "FROM products " _
& "WHERE active = -1 " _
& "AND homePage = -1 " _
& "ORDER BY idProduct DESC "
set rsTemp = openRSopen(mySQL,0,adOpenStatic,adLockReadOnly,adCmdText,pMaxItemsPerPage)
'If Featured Products = 0 then use "_INCright_.asp"
if rsTemp.EOF then
call noProd()
else
'If Featured Products <= 2 then display single rows
if rsTemp.RecordCount <= 2 then
do while not rsTemp.EOF
call singleProd()
if not rsTemp.EOF then
rsTemp.MoveNext
end if
loop
'If Featured Products > 2 then display double rows
else
do while not rsTemp.EOF
call doubleProd()
if not rsTemp.EOF then
rsTemp.MoveNext
end if
loop
end if
end if
%>
|
 |