コード例 #1
0
 def mod(self):
     updateTable(
         'products',
         (self.name, self.dsc, self.material, self.genre, self.brand,
          self.type, self.discount, self.price, self.id),
         'name = %s, dsc = %s, material = %s, genre = %s, brand = %s, type = %s, discount = %s, price = %s'
     )
コード例 #2
0
 def mod(self):
     new_record = (self.dni, self.name, self.surname, self.genre,
                   self.c_size, self.shoe_size, self.phone_no, self.id)
     updateTable(
         'customers', new_record,
         'dni = %s, name = %s, surname = %s, genre = %s, c_size = %s, shoe_size = %s, phone_no = %s'
     )
コード例 #3
0
 def mod(self):
     updateTable(
         'reservations', (self.date, self.stock, self.id_user,
                          self.id_color_size, self.state, self.id),
         'date = %s, stock = %s, id_user = %s, id_color_size = %s, state = %s'
     )
コード例 #4
0
 def setState(self):
     updateTable('purchase', (self.state, self.id), 'state = %s')
コード例 #5
0
 def mod(self):
     updateTable(
         'purchase',
         (self.price, self.state, self.id_user, self.id_coupon, self.id),
         'price = %s, state = %s, id_user = %s, id_coupon = %s')
コード例 #6
0
 def setTrackCode(self):
     updateTable('shipping', (self.track_code, self.id), 'track_code = %s')
コード例 #7
0
 def mod(self):
     updateTable(
         'shipping', (self.address, self.zip, self.name, self.surname,
                      self.dni, self.track_code, self.province, self.id),
         'address = %s, zip = %s, name = %s, surname = %s, dni = %s, track_code = %s, province = %s'
     )
コード例 #8
0
 def use(self):
     self.used = True
     updateTable('coupon', (self.used), 'used = %s')
コード例 #9
0
 def mod(self):
     new_record = (self.name, self.id)
     updateTable('type', new_record, 'name = %s')
コード例 #10
0
 def mod(self):
     updateTable('color_size',
                 (self.color, self.size, self.stock, self.prod_id, self.id),
                 'color = %s, size = %s, stock = %s, prod_id = %s')
コード例 #11
0
 def setActive(self):
     updateTable('products', (self.active, self.id), 'active = %s')
コード例 #12
0
 def mod(self):
     new_record = (self.e_mail, self.psw, self.id)
     updateTable('users', new_record, 'e_mail = %s, psw = %s')
コード例 #13
0
 def mod(self):
     updateTable('message',
                 (self.msg, self.date, self.id_user, self.id_chat, self.id),
                 'msg = %s, date = %s, id_user = %s, id_chat = %s')
コード例 #14
0
 def mod(self):
     updateTable('roles', (self.name, self.id), 'name = %s')
コード例 #15
0
 def cancel(self):
     updateTable('reservations', ('cancelled', self.id), 'state = %s')
コード例 #16
0
 def mod(self):
     updateTable(
         'review', (self.stars, self.title, self.commentary,
                    self.id_product, self.id_user, self.id),
         'stars = %s, title = %s, commentary = %s, id_product = %s, id_user = %s'
     )
コード例 #17
0
 def mod(self):
     updateTable('coupon', (self.pc, self.cad_date, self.used, self.id),
                 'pc = %s, cad_date = %s, used = %s')