THE CODE BELOW IS UPDATED CODE THAT WORKS
I am getting a syntax error when I try to run this. Here is the relevant code:
import sqlite3
mydatabase="/Users/noahclark/cities.db"
connection=sqlite3.connect(mydatabase)
cur = connection.cursor()
def getDaysURLS(self):
day = cur.execute('select state from cities where city = "pointer"')
day = cur.fetchone()[0]
print day
cur.execute('select URL from cities where day = ?', (str(day),))
When I run this code, I get the following error.
Tkinter.py", line 1410, in __call__
return self.func(*args)
File "tkinter.py", line 50, in getDaysURLS
cur.execute(urlstring)
OperationalError: near "<": syntax error
I can run the -- select state from cities where city is "pointer" -- line in the sqlite command line and it works.
Any ideas or pointers? Thanks in advance.