检查用户名是否存在 PDO
本文介绍了检查用户名是否存在 PDO的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我如何能够检查多个因素的组合而不是检查每个因素?所以基本上我使用的是 PDO,我必须确保用户名和电子邮件是唯一的.那我该怎么做呢?我见过
How would I be able to check multiple factors combined instead of checking for each one? So basically I'm using PDO and I have to make sure that the usernames and emails are unique. So how would I do that? I've seen
但是有没有更好的方法来做到这一点.此外,如果没有,有人可以解释我将如何处理它.
But is there a better way to do it. Also if there isn't can someone explain how I'd work with that.
编辑这是我输入到数据库中的查询代码
EDIT Here's my query code that inputs into the database
推荐答案
这篇关于检查用户名是否存在 PDO的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持编程学习网!