php - Can I MD5 a column I'm selecting? -


I have done some Google engagement and nothing has been brought to it, so I am asking here.

I'm trying to run this query (the language is PHP):

  SELECT * to the table WHERE MD5 (field1) = '$ var'   

This is not returning to any rows,

Any help is appreciated.

PS

I have tried some variations such as "SELECT field1 from table to name where MD5 (name) = '$ var'" but it still does not work Does.

Edit:

I understand that there are a lot of things in answer to this question, such as 1. It is for a login system (it is related to a related, but Not for login system), 2. I'm not getting my values ​​before saving it DB (I am but this fixed position does not know plain text, thus I need an MD5 column in the SQL query ). A lot of these assumptions were done because I simplify hell out of example to express my question. Thanks to those who tried to answer.

Yes, an MD5 function of MySQL has been created.

  & lt ;? Php ... (The table WHERE MD5 (password) = '$ password'; "" or "die" (... ??   

) should work fine if it If you are not returning to any rows, then you have to do something wrong.

Comments

Popular posts from this blog

mysql - BLOB/TEXT column 'value' used in key specification without a key length -

memcached - Django cache performance -