I have this simple database:
SecretaryID username password
1 marpap marpap
2 eleko eleko
And I do this query:
select username, password
from Secretaries
where username='marpap' and
Password='marpap'
but it return 0 rows instead of 1. What is the problem?
Try using LTRIM and RTRIM to remove spaces before or after your string.
where LTRIM(RTRIM(username)) = 'marpap'
and password = 'marpap'
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With