/** * Puts a message in the database Note: the timestamp will be stored as the current time at which * this method is called. */ public void storeMessage(Message message) { con.updateDB( "INSERT INTO " + MESSAGES + " VALUES ( \"" + message.getFrom() + "\", \"" + message.getTo() + "\", \"" + message.getBody() + "\", " + null + ", " + message.getType() + ")"); }
/** * Puts a message in the database Note: the timestamp will be stored as the current time at which * this method is called. */ public void storeMessage( String from, String to, String message, int messageType, String timestamp) { con.updateDB( "INSERT INTO " + MESSAGES + " VALUES ( \"" + from + "\", \"" + to + "\", \"" + message + "\", " + null + ", " + messageType + ")"); }