# Strange MYSQL Problem

**URL:** <https://forum.kirupa.com/t/strange-mysql-problem/275769>\
**Category:** programming\
**Created:** [November 18, 2008, 3:51pm UTC](https://forum.kirupa.com/t/strange-mysql-problem/275769 "2008-11-18T15:51:15Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![skidpanda2](https://avatars.discourse-cdn.com/v4/letter/s/e274bd/32.png) [@skidpanda2](https://forum.kirupa.com/u/skidpanda2)\
**Post date:** [November 18, 2008, 3:51pm UTC](https://forum.kirupa.com/t/strange-mysql-problem/275769/1 "2008-11-18T15:51:15Z")

</div>

Hi,

I have a log in form but for some reason some usernames work and some dont. I’ve never encountered something like this before so I thought I would throw it out there to see if any fellow kirupians can help.

Basically I have this simplified query for finding a user in a mysql db:

This works:  
[FONT=Helvetica]SELECT \* FROM Access\_list WHERE username=“Colourjam” AND password=“5f4dcc3b5aa765d61d8327deb882cf99” AND active=“Yes” LIMIT 1

If I use this it doesnt work:  
SELECT \* FROM Access\_list WHERE username=“lesleyannpotter” AND password=“5f4dcc3b5aa765d61d8327deb882cf99” AND active=“Yes” LIMIT 1[/FONT]  
[FONT=Helvetica][/FONT]  
[FONT=Helvetica]Both records are present in the database but for some reason the “lesleyannpotter” account isn’t found in phpMyAdmin when I run the query even though its there. The Colourjam account is found no problem. Both entries have the same password stored in the db as MD5. The hash = “password”.[/FONT]  
[FONT=Helvetica][/FONT]  
[FONT=Helvetica]Help! :}[/FONT]  
[FONT=Helvetica][/FONT]  
[FONT=Helvetica]Thanks[/FONT]
