熱點推薦:
您现在的位置: 電腦知識網 >> 編程 >> MySQL >> 正文

用sql存儲過程實現前台標題變色

2013-11-23 21:05:31  來源: MySQL 
源程序:

  ALTER   proc GetDataByNumCategory
(
@Carcategory nvarchar()
)
as
declare @sql nvarchar()
declare @Num nvarchar()
set @Num=(select top Keyword from TaoCarActive)
declare @Green  nvarchar()
declare @Green  nvarchar()
set @Green=<span style="color:Green;">
set @Green=</span>

  declare @Red  nvarchar()
set @Red=<span style="color:Red;">
declare @Red  nvarchar()
set @Red=</span>

  
exec(select top +@Num+ 
      ID
      case when Hits= then +@Green++CarCard++@Green+ 
      else +@Red++CarCard++@Red+ end  as CarCard   
from 
TaoCarActive where Carcategory=+@Carcategory+ order by ID)


From:http://tw.wingwit.com/Article/program/MySQL/201311/29561.html
  • 上一篇文章:

  • 下一篇文章:
  • 推薦文章
    Copyright © 2005-2013 電腦知識網 Computer Knowledge   All rights reserved.