Jump to content

select password returns empty set


zyonsherlock

Recommended Posts

i've got a problem with my query, at first i thought it was in my php script, but it doesn't return any error. after that i run my query in mysql prompt, it seems that whenever i run a query with a "where password = password("password");", it returns an empty set. I search for some answers here and in other online forums, even in mysql ab but nothing helped me with this problem. i'm searching for errors for the past 2 days already, i don't know what to do with this, it's making me nuts already! anyone? help? please?  :'( all answers are welcome...thanks in advance! 
Link to comment
Share on other sites

when i do the select "password('password')", it shows the encrypted version, but the encrypted version is 1 (letter or number) longer than the one that was selected in "select * from table;" .
e.g.
mysql>select * from users;

user    password
duh      p102p394kr843pouk

mysql>select password('password');
           
              password('password')
              p102p394kr843pouk[b]e[/b]

When i copy that encrypted one and make a query for it, it still returns an empty set
e.g.
select username, password where username="duh" and password = "1o2j43ik4j34kjoipo";

is it the encryption of passwords?coz i think thats the problem. i've been stuck with this problem for the past 3 days already, and i dont find any typo errors or any errors at all with my query, if thats the problem, what should i do?
Link to comment
Share on other sites

hi! thanks for your help! i solved my problem a while ago. i've read the documentation of mysql for this one and i've learned that my problem was my password length, it was set to 40, it must be set to at least 41 bytes so that it can accomodate the long hashes, i've set mine to 45 just in case, thanks again!!!  ;D
Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.