以下是核心代码using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;namespace 多条件搜索
{public partial class Form1 : Form{pub…
private void NewMethod(){StringBuilder sqlStr = new StringBuilder();sqlStr.Append("select * from table1 ");List<string> wheres = new List<string>();List<SqlParameter> listParameters = new List<SqlParameter>();if (textBox1.…
--数据库SQL注入攻击select count(*) from 表 where LoginID='lqwvje' and pwd='123'--拿上面的一个经常用的用户登入实例 正常情况下是没有问题 count0即可以登入成功--用户名一但输入了数据库特殊字符如一下 一段代码 那就可以正常登入select count(*) from 表 where Lo…
select * from 表 where 字段>=20 and 字段<=30
-- 以下功能和上面相同语句
select * from 表 where 字段 between 20 and 30
--------------------------------------------------
select * from 表 where 字段=3 or 字段=4 or 字段=5
--以下功能和上面相同语句 系统编…