def select_by_ntd_num_and_hold_num(self, key, hold_num): connect = Connect() connect.sql_execute('select * from item where ntd# = ' + "'" + str(key) + "' and hold# = " + "'" + hold_num + "'") row = connect.cur.fetchone() item = Item() item.set_values_from_row(row) return item
def select_all(self): connect = Connect() connect.sql_execute('select * from item') item_list = [] for row in connect.cur: item = Item() item.set_values_from_row(row) item_list.append(item) return item_list
def select_by_hold_num(self,key): connect = Connect() connect.sql_execute('select * from item where hold# = ' + "'" + str(key) + "'") item_list = [] for row in connect.cur: item = Item() item.set_values_from_row(row) item_list.append(item) return item_list