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

来源:百度知道 编辑:UC知道 时间:2024/09/12 14:28:46
1.vc++6.0中代码,这条语句是什么意思啊?

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

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

---
以上,希望对你有所帮助。

最后的结果是返回

select * from 数据库表 where 用户名=m_1 and 密码=m_2