构造查询语句 sql

来源:互联网 发布:淘宝有没有降价通知 编辑:程序博客网 时间:2024/06/10 08:47
  1. sqlt="select top 10 * from search_word where f_class=2 "
  2.                    if m_keywords<>"" then                    
  3.                      sqlt=sqlt" and ("
  4.                       for i = 0 to ubound(idwords)                    
  5.                       if idwords(i)<>"" then 
  6.                       if i>0 then sqlt=sqlt" or "
  7.                       sqlt=sqlt" f_word like  '%" & idwords(i) & "%'"
  8.                        end if
  9.                       next
  10.                      sqlt=sqlt" ) "
  11.                      end if
原创粉丝点击