File tree 1 file changed +3
-0
lines changed
1 file changed +3
-0
lines changed Original file line number Diff line number Diff line change 16
16
17
17
# calling a method inside of cur or cursor to execute a bit of sql
18
18
# we are basically saying hey ! just create a table if it doesn't EXISTS Name the table Loccations and put colous in it address,geodata!!
19
+
19
20
cur .execute ('''CREATE TABLE IF NOT EXISTS Locations (address TEXT, geodata TEXT)''' )
20
21
21
22
fh = open ("where.data" )
24
25
for line in fh :
25
26
if count > 200 : break #we are basically saying that we will take 200 at a time!!!
26
27
address = line .strip ()
28
+
27
29
cur .execute ("SELECT geodata FROM Locations WHERE address= ?" , (buffer (address ), ))
30
+
28
31
#buffer is a way to force address onto the address coloumn.
29
32
#what it does is that it searches for geodata coloumn database looks down where address ? first time we don't have it because we
30
33
#just made a table.
You can’t perform that action at this time.
0 commit comments