I have a MySQL database which stores intranet user data (name, username, password (encrypted), department) is the following
is the following a viable way of verifyin the login
select count(id) from table where (username='username') and (password='encytpedPassword');
if the record exists, i should get 1 as it should be the only username in the database and also i am not returning any data from the database until the count(id) = 1 and then run another script to retrieve the required data at another point...is this overkill???