Skip to content
Snippets Groups Projects
Commit 3c4149bd authored by mjw11's avatar mjw11
Browse files

create activatePatient function in DAO

parent a4a4215f
No related branches found
No related tags found
1 merge request!22Merge UC92 into Master
......@@ -190,6 +190,22 @@ public class PatientDAO {
}
}
public void activatePatient(long mid) throws DBException {
Connection conn = null;
PreparedStatement ps = null;
try {
conn = factory.getConnection();
ps = conn.prepareStatement("UPDATE users SET role=? WHERE MID=?");
ps.setString(1, "patient")
ps.setLong(2, mid);
} catch (SQLException e) {
throw new DBException(e);
} finally {
DBUtil.closeConnection(conn, ps);
}
}
/**
* Updates a patient's information for the given MID
*
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment