the difference is that @SpacePhoenix wants to count the number of results, so he has to use fetchAll() even if there is only a single result. but counting result rows ain’t necessary at all as @BlackScorp demonstrates.
@BlackScorp yes, Exceptions must be explicitly enabled.
@BlackScorp the LIMIT 1
is not necessary, since email
and password
must be a unique (composite) key