db.DbCmd.CommandText = " select * from thinginfo where thinginfo_script like '%' +@txtMsg+ '%' or thinginfo_script like '%' +@txtMsg1+ '%'"<br> db.DbCmd.Parameters.AddWithValue("@txtMsg", txtMsg.Text)<br> db.DbCmd.Parameters.AddWithValue("@txtmsg1", txtMsg1.Text) <br>
模糊查询
最新推荐文章于 2022-11-14 18:20:53 发布
本文介绍了一种使用参数化查询的方法来构建SQL查询语句,通过动态添加条件实现对数据库表的灵活检索。具体展示了如何根据两个输入参数构建一个SQL查询,用于从thinginfo表中筛选符合条件的数据。
4432

被折叠的 条评论
为什么被折叠?



