def add(self): cur = conn.execute( 'insert into driver (name,contact,password,b_id,userid) values (?,?,?,?,?)', [self.name, self.contact, self.password, self.b_id, self.userid]) print([self.name, self.contact, self.password, self.b_id, self.userid]) conn.commit() return cur.lastrowid
def add(self): cur = conn.execute( 'insert into feedback (name,email,title,message,date,p_id,d_id) values (?,?,?,?,?,?,?)', (self.name, self.email, self.title, self.message, self.date, self.parent_id, self.driver_id)) conn.commit() return cur.lastrowid
def add(self): try: cur = conn.execute( 'insert into kid (name,section,photo,p_id,b_id) values(?,?,?,?,?)', (self.name, self.section, self.photo, self.p_id, self.b_id)) conn.commit() except: return None return cur.lastrowid
def update_token(email, token, expire): cur = conn.execute('update parent set token=?,expires=? where email=?', [token, expire, email]) conn.commit()
def add(self): cur = conn.execute( 'insert into parent (name,password,email,phone,home_gps) values(?,?,?,?,?)', (self.name, self.password, self.email, self.phone, self.home_gps)) conn.commit() return cur.lastrowid
def add(self): cur = conn.execute( 'insert into location (gps,time,j_id) values(?,?,?) ', (self.gps, self.time, self.j_id)) conn.commit() return cur.lastrowid
def update_gps(journey_id, gps): cur = conn.execute('update journey set gps=?,last_update=? where id=?', (gps, utils.get_date_full(), journey_id)) conn.commit()
def add(self): cur = conn.execute( 'insert into journey (b_id,board,date,start,end,gps) values(?,?,?,?,?,?),', (self.b_id, self.board, self.date, self.start, self.end, self.gps)) conn.commit() return cur.lastrowid
def update_token(token, expires, userid): cur = conn.execute( 'update driver set token=?,expires=? where userid=?', [token, expires, userid]) conn.commit()