当前位置:Gxlcms > 数据库问题 > 有复选框情况下,sql拼写技巧

有复选框情况下,sql拼写技巧

时间:2021-07-01 10:21:17 帮助过:11人阅读

复选框选中只取合格的数据,没有选中取所有的数据。

string filterOk = (ckbOnlyOk.Checked ? " and (jyjg=‘合格‘) " : " ");//复选框选中取and (jyjg=‘合格‘),没有选中取" "

string strSql = "select * from Student where" + filterOk + " order by name";

有复选框情况下,sql拼写技巧

标签:student   order   sql   没有   where   from   select   选中   rom   

人气教程排行