Advertisement
Guest User

Untitled

a guest
Aug 20th, 2019
102
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.33 KB | None | 0 0
  1. def checkDB(user):
  2.    
  3.     import sqlite3
  4.        
  5.     Connect = sqlite3.connect('databs.db')
  6.     Cursor = Connect.cursor()
  7.        
  8.     sql = """SELECT ID FROM datauser WHERE ID = ?"""
  9.     Cursor.execute(sql, (user,))
  10.     check = Cursor.fetchall()
  11.        
  12.     if user_id in (row[0] for row in check):
  13.        
  14.         print('1')
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement