Could somebody please help me. When I try to run a new program IDLE gives me the following message
sqlite3.OperationalError: near “Where”: syntax error’‘’ in line 30
I checked several articles on tracing syntax errors and learned that the error would probably be in line 30 or above. The program does create a new database on line 28 and similar code works in other programs, so I am totally confused.
///‘’’
import tkinter as tk
from tkinter import ttk
from tkinter import messagebox
import sqlite3
=====================================
ROOT
=====================================
create instance
root = tk.Tk()
Style as ttk
style = ttk.Style()
style
root.title(“Business Database”)
root.geometry(“1450x700”)
=====================================
DATABASE
=====================================
conn = sqlite3.connect(“appointments.db”)
cursor = conn.cursor()
cursor.execute(“”"
CREATE TABLE IF NOT EXISTS appointments (. # this line works
id INTEGER PRIMARY KEY AUTOINCREMENT,
Date TEXT,
Time Text,
With TEXT,
Where TEXT, # this is line 30
Reason TEXT,
Phone TEXT,
Note TEXT
)
“”")
conn.commit()
///'''