This website works better with JavaScript.
Home
Explore
Help
Register
Sign In
Cinabre
/
My-Manga-List
Watch
1
Star
0
Fork
0
Code
Issues
0
Pull Requests
0
Releases
0
Wiki
Activity
Browse Source
Creation du fichier + fonction get_username à partir de l'id
master
TheBidouilleur
2 weeks ago
parent
f5a475296e
commit
4908cc8987
1 changed files
with
9 additions
and
0 deletions
Split View
Diff Options
Show Stats
Download Patch File
Download Diff File
+9
-0
database.py
+ 9
- 0
database.py
View File
@@ -0,0 +1,9 @@
import sqlite3, sys
conn = sqlite3.connect('database.db')
cursor = conn.cursor()
def get_username(id):
cursor.execute("SELECT username FROM users WHERE id = '%s';" % id)
rows = cursor.fetchall()
return rows[0][0]
Write
Preview
Loading…
Cancel
Save