PHP头条
热点:

ThinkPHP框架关于数据库是否存在某值的有关问题


ThinkPHP 框架 关于数据库是否存在某值的问题



就是想做一个登录系统,但是提交先前注册好的总是输出





是不是where()哪里出问题了,该怎么改啊?

我的数据库中账号为  account_number
分享到:
------解决方案--------------------
where('account_number=$username')
至少应写作
where("account_number=$username")
考虑到 $username 可能不是纯数字
所以应写作
where("account_number='$username'")

where(array('account_number' => $username))

www.phpzy.comtrue/phprm/11764.htmlTechArticleThinkPHP框架关于数据库是否存在某值的有关问题 ThinkPHP 框架 关于数据库是否存在某值的问题 就是想做一个登录系统,但是提交先前注册好的总是输出 是不是where()哪里出问题了,该...

相关文章

相关频道:

PHP之友评论

今天推荐