asp 怎样让价格从低到高,从高到低排序!
来源:百度知道 编辑:UC知道 时间:2024/06/01 02:15:16
默认按发布时间排序就这么改:
if request("odr")="up" then
sql="select id,name,pic,price2,mark,score from product where cat1id="&m_classid&" or cat3id="&m_classid&" order by price2 desc,adddate desc"
elseif request("odr")="down" then
sql="select id,name,pic,price2,mark,score from product where cat1id="&m_classid&" or cat3id="&m_classid&" order by price2,adddate desc"
else
sql="select id,name,pic,price2,mark,score from product where cat1id="&m_classid&" or cat3id="&m_classid&" order by adddate desc"
end if
=========================================
看了源程序,应该这样:
sql="select id,name,pic,price2,mark,score from product where cat1id="&m_classid&" or cat3id="&m_classid&" order by adddate desc"
把上面这行改为:
if request("odr")="up" then
sql="select id,name,pic,