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

Change casing on DAO to match table casing

parent ae0270e2
No related branches found
No related tags found
1 merge request!22Merge UC92 into Master
......@@ -73,12 +73,12 @@ public class PatientDAO {
PreparedStatement ps = null;
try {
conn = factory.getConnection();
ps = conn.prepareStatement("SELECT registered FROM patients WHERE MID=?");
ps = conn.prepareStatement("SELECT Registered FROM patients WHERE MID=?");
ps.setLong(1, mid);
ResultSet rs;
rs = ps.executeQuery();
if (rs.next()) {
Integer b = rs.getObject("registered") != null ? rs.getInt("registered") : null;
Integer b = rs.getObject("Registered") != null ? rs.getInt("Registered") : null;
if (b == 1) {
return true;
} else if (b == 0) {
......@@ -111,7 +111,7 @@ public class PatientDAO {
PreparedStatement ps = null;
try {
conn = factory.getConnection();
ps = conn.prepareStatement("UPDATE PATIENTS SET registered = ? WHERE mid = ?");
ps = conn.prepareStatement("UPDATE patients SET Registered = ? WHERE mid = ?");
ps.setByte(1, 1);
ps.setLong(2, mid);
ps.executeUpdate();
......@@ -139,7 +139,7 @@ public class PatientDAO {
PreparedStatement ps = null;
try {
conn = factory.getConnection();
ps = conn.prepareStatement("UPDATE PATIENTS SET DateofDeactivation = ?, registered = ? WHERE mid = ?");
ps = conn.prepareStatement("UPDATE patients SET DateofDeactivation = ?, Registered = ? WHERE mid = ?");
Date date = new Date(Calendar.getInstance().getTime().getTime());
ps.setDate(1, date);
ps.setByte(2, 0);
......
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