Employee.getTableName(), loginRequest.email, loginRequest.password);
ResultSet rs = dbConnector.query(q);
if (rs.next()) {
if (rs.getBoolean("dirty")) {
dbConnector.execute(SQLFormatter.generateQuery("UPDATE %s SET dirty = 0 WHERE id = %d", Employee.getTableName(), rs.getLong("id")));
throw new DBDirtyException(rs.getLong("id"));
}
dbConnector.execute(SQLFormatter.generateQuery("UPDATE %s SET lastlogin = UNIX_TIMESTAMP() WHERE id= %d",
Employee.getTableName(), rs.getLong("id")));
Employee e = new Employee(null, rs);