Skip to content

Commit 5344f65

Browse files
project tested
1 parent 9576c54 commit 5344f65

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

geoload.py

+3
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@
1616

1717
# calling a method inside of cur or cursor to execute a bit of sql
1818
# 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+
1920
cur.execute('''CREATE TABLE IF NOT EXISTS Locations (address TEXT, geodata TEXT)''')
2021

2122
fh = open("where.data")
@@ -24,7 +25,9 @@
2425
for line in fh:
2526
if count > 200 : break #we are basically saying that we will take 200 at a time!!!
2627
address = line.strip()
28+
2729
cur.execute("SELECT geodata FROM Locations WHERE address= ?", (buffer(address), ))
30+
2831
#buffer is a way to force address onto the address coloumn.
2932
#what it does is that it searches for geodata coloumn database looks down where address ? first time we don't have it because we
3033
#just made a table.

0 commit comments

Comments
 (0)