I am testing to hash using sha1 and i have inserted a row :
insert into tbl_user (username, password, email) values ('maysam', sha1('21lf892'), 'gerdakan.sa@gmail.com');
and when i want to select a row like using :
select * from tbl_user where password = sha1('21lf892');
and result is :
Empty set (0.00 sec)
but if i try to select using like username :
select * from tbl_user where username = 'maysam';
+----+----------+--------------------------------+-----------------------+
| id | username | password | email |
+----+----------+--------------------------------+-----------------------+
| 2 | maysam | dd989b1d1d67c6e706852024ccb6a1 | gerdakan.sa@gmail.com |
+----+----------+--------------------------------+-----------------------+
what is the problem? why it can't select ?( i have tested hashing and selecting using md5 and sha2....