Commit 16c4983d authored by Daniel Kim's avatar Daniel Kim
Browse files

oops

parent 4f1f1e9f
......@@ -677,15 +677,9 @@ public class ClientApplication {
updateId.execute(updateIdQuery);
Statement st = c.createStatement();
<<<<<<< HEAD
String query = String.format("insert into People values ('%s', '%s', '%s', '%s', '%s', '%s')",
"nm" + maxId,
values.get(name),
=======
String query = String.format("insert into People values ('%s', '%s', '%s', '%s', '%s', '%s', '%s')",
"nm" + maxId,
values.get(name),
>>>>>>> ap
values.get(originalName),
values.get(height),
values.get(biography),
......@@ -698,33 +692,11 @@ public class ClientApplication {
Statement st2 = c.createStatement();
String deathQuery = String.format("insert into DeadPeople values ('%s', '%s', '%s', '%s')",
"nm" + maxId,
<<<<<<< HEAD
new java.sql.Timestamp(format.parse(values.get(dateOfDeath)).getTime()),
values.get(placeOfDeath),
values.get(reasonOfDeath)
);
ResultSet rs2 = st2.executeQuery(deathQuery);
printQueryResults(rs2);
}
printQueryResults(rs);
Statement updateId = c.createStatement();
String updateIdQuery = "update MaxIDs set entityNum = " + maxId + " where entityName = 'person'";
boolean updateIdRs = updateId.execute(updateIdQuery);
if (updateIdRs) {
System.out.println("Person successfully added, nameId = " + maxId);
}
else {
System.out.println("Error updating max id");
=======
new java.sql.Timestamp(format.parse(values.get(dateOfDeath) + " 00:00:00").getTime()),
values.get(placeOfDeath),
values.get(reasonOfDeath)
);
st2.execute(deathQuery);
>>>>>>> ap
}
} catch (Exception e) {
System.out.println(e);
......
public class Constants {
public static final String db_url = "jdbc:mysql://127.0.0.1:3306";
public static final String db_user = "root";
public static final String db_pwd = "db4kimece356";
public static final String db_url = "jdbc:mysql://marmoset03.shoshin.uwaterloo.ca";
public static final String db_user = "";
public static final String db_pwd = "";
}
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment