Сначала создайте таблицу:
my_cursor.execute("""CREATE TABLE MemberDetails(
mid text,
member_name text,
member_phone_number text,
member_address text
)""")
Затем замените
insert_data = my_cursor.execute("insert into MemberDetails(Member_ID, Member_Name, Phone_Number, address)"
"values('mid', 'member_name', 'member_phone_number', member_address)"
)
на:
with conn:
my_cursor.execute("INSERT INTO MemberDetails VALUES (:mid, :member_name, :member_phone_number, :member_address)",
{'mid': mid, 'member_name': member_name, 'member_phone_number': member_phone_number, 'member_address': member_address})