Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Select query for email address suddenly stopped working #100

Open
sendy34 opened this issue Sep 1, 2017 · 1 comment
Open

Select query for email address suddenly stopped working #100

sendy34 opened this issue Sep 1, 2017 · 1 comment

Comments

@sendy34
Copy link

sendy34 commented Sep 1, 2017

I have a table called users, and I used to check email adress and password for login credentials. Everything worked fine, but suddenly email addresses stopped working so I removed @ symbol from email and it started working.

Here's my query:
$user = $db->row("SELECT * FROM users WHERE email=:email AND password=:password", array("email"=>$_POST['email'], "password"=> md5($_POST['password']) ));

this returns 0 results if email address has @ symbol.
And returns 1 row if I remove @ sign from email address in database.

How should I solve it?

@Gibigbig
Copy link

Gibigbig commented Feb 4, 2019

Seems this package is not maintained but I had a similar issue with similar symptoms.

The culprit was my database table accepting an integer when my variable was string. I suspect you need to edit the column type. Again, two years late. Hope this helps someone.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants