- public void setFname(String fname) {
- this.name.fname = fname;
- }
-
- public void setLname(String lname) {
- this.name.lname = lname;
- }
-
- public void insert(String password) {
- int id = super.insert();
- GigiPreparedStatement query = DatabaseConnection.getInstance().prepare("insert into `users` set `email`=?, `password`=?, " + "`fname`=?, `mname`=?, `lname`=?, " + "`suffix`=?, `dob`=?, `language`=?, id=?");
- query.setString(1, email);
- query.setString(2, PasswordHash.hash(password));
- query.setString(3, name.fname);
- query.setString(4, name.mname);
- query.setString(5, name.lname);
- query.setString(6, name.suffix);
- query.setDate(7, new java.sql.Date(dob.getTime()));
- query.setString(8, locale.toString());
- query.setInt(9, id);
- query.execute();
- }
-