def add_profile_contact(self, user_id, contact): timestamp = time.time() self.cur.execute('''INSERT OR REPLACE INTO Profiles(user_id, contact, time, human_time) VALUES ('{0}','{1}','{2}','{3}')'''.format(user_id, contact, timestamp, trasform_to_human_time(timestamp))) self.con.commit() return True
def add_profile_name(self, user_id, name): timestamp = time.time() self.cur.execute('''UPDATE Profiles SET name = '{0}', time = '{1}', human_time = '{2}' WHERE user_id ={3};'''.format(name, timestamp, trasform_to_human_time(timestamp), user_id)) self.con.commit() return True
def set_user_status(self, user_id, status): timestamp = time.time() self.cur.execute('''INSERT OR REPLACE INTO Users VALUES ('{0}','{1}','{2}','{3}')'''.format(user_id, status, timestamp, trasform_to_human_time(timestamp))) self.con.commit() return True