|
主题:[原创]科汛商城系统销售排行榜自定义SQL标签 [收藏主题] | 转到: |
SELECT top {$Param(0)} a.sumamount,b.title, b.id FROM [SELECT proid, Sum(amount) AS sumamount FROM ks_orderitem WHERE Datediff('d',begindate,now())<={$Param(1)} Group by proid ]. AS a, ks_product AS b WHERE a.proid=b.id order by a.sumamount DESC
[loop={$Param(0)}]<img src="/images/shuzi/1/{$AutoID}.gif" valign="middle"><a href="{$Field(id,GetInfoUrl,5,1)}" title="{$Field(title,Text,0,...,0,)}" target="_blank">{$Field(title,Text,0,...,0,)}</a></br>[/loop]
完善一下. |
|
支持(0) | 反对(0) 顶端 底部 |
<上一主题 | 下一主题 > |