我用sql="select * from book where SiteNum like {fn concat('%',{fn concat('"& Request("site_num") &"','%')})} order by SiteNum" 按编号查询数据库book表中的信息,但怎样实现在一句查询语句实现按编号或按名称查询,查询语句该怎样写. 请大家帮忙,谢谢!!!
那如何将下面那句语句合并起来呢? sql="select * from book where SiteNum like {fn concat('%',{fn concat('"& Request("site_num") &"','%')})} order by SiteNum" sql="select * from book where SiteName like {fn concat('%',{fn concat('"& Request("site_name") &"','%')})} order by SiteNum" 我试了下,都有错
可以用关键字查询 keyword1=Request("site_num") keyword2=Request("site_name") sql="select * from book where site_num like'%"&keyword1&"%' and site_name like'%"&keyword1&"%' order by id desc"