strCmd.Format("delete FROM userTable where name = '%s'", name);

string.Format("select * from 数据库表 where 用户名='%s' and 密码='%s' ",m_1,m_2);

把【m_1】和【m_2】的值按照【%s】的格式传给字符串【select * from 数据库表 where 用户名='%s' and 密码='%s' 】。

比如:m_1=张三,m_2='abc' 那么出来的结果就是:
【select * from 数据库表 where 用户名='张三' and 密码='abc'】

posted @ 2019-09-04 16:17  渔阳俊俊  阅读(439)  评论(0编辑  收藏  举报