Updated getAccount method in DB to use SQL where clause rather than
nested ifs