I checked the passwords for the users against the DB.
What is faster, the MySQL MD5 function
... pwd = MD5(\'.$pwd.\')
I would say, read the column value out of mysql, then compare the result with the computed hash in your client code (e.g. php).
The main reason for doing this is that it avoids stupid things such as the database collating the column in a non-binary fashion (e.g. case-insensitive etc), which is generally undesirable for a hash.