@@ -20,6 +21,6 @@ with sqlite3.connect('db/urls.db') as conn:
conn=sqlite3.connect('db/urls.db')
cursor=conn.cursor()
res=cursor.execute('SELECT LONG_URL, SHORT_URL FROM WEB_URL WHERE 1')#read all data from database
res=cursor.execute('SELECT LONG_URL, SHORT_URL, USERNAME FROM WEB_URL WHERE 1')#read all data from database
forentriesinres.fetchall():
print(str(entries[1]).replace('"',"")+";"+str(entries[0]).replace('"',""))#format the data and print it to console. with a pipe you can redirect the output to a file e.g. python export.py > urls.csv
\ No newline at end of file
print(str(entries[1]).replace('"',"")+";"+str(entries[0]).replace('"',"")+";"+entries[2])#format the data and print it to console. with a pipe you can redirect the output to a file e.g. python export.py > urls.csv