def get_shows_followed(): result = db.execute_sql( sqltype='Fetch', sql=f'select * from shows where status = "Followed"') result = convert_to_dict_within_list(result, data_type='DB', field_list=shows.field_list) return result
def get_show_by_name(showname): result = db.execute_sql(sqltype='Fetch', sql=f'select * from shows ' f'where showname = "{showname}"') result = convert_to_dict_within_list(result, data_type='DB', field_list=shows.field_list) return f'{result}'
def get_show_by_name_followed_wild(showname): result = db.execute_sql( sqltype='Fetch', sql=f'select * from shows ' f'where showname like "%{showname}%" and status = "Followed"') result = convert_to_dict_within_list(result, data_type='DB', field_list=shows.field_list) return f'{result}'
def get_shows_page(page): if int(page) <= 0: result = db.execute_sql(sqltype='Fetch', sql=f'select * from shows where showid < 1000') else: start = int(page) * 1000 end = int(page) * 1000 + 999 result = db.execute_sql( sqltype='Fetch', sql=f'select * from shows where showid between {start} and {end}') result = convert_to_dict_within_list(result, data_type='DB', field_list=shows.field_list) return result