直接从数据库中搜索出带红色关键字的sql语句

SELECT 
     (replace([Col_Title],'" + Request.QueryString["kw"] + "','<font color='red'>" + Request.QueryString["kw"] + "</font>') as cTitle)
 
  FROM [zgkxy].[dbo].[Col_News]
 
where   charindex('" + Request.QueryString["kw"] + "',Col_Title)>0

posted @ 2012-11-01 09:51  xyzhuzhou  阅读(261)  评论(0编辑  收藏  举报