25 lines
715 B
Python
25 lines
715 B
Python
import sqlite3
|
|
|
|
class sqlite:
|
|
def __init__(self):
|
|
conn = sqlite3.connect('bd/db.db')
|
|
self.cur=conn.cursor()
|
|
#self.cur.execute("SELECT * FROM users;")
|
|
#one_result = self.cur.fetchone()
|
|
#print(one_result)
|
|
|
|
def install(self, tab, pole):
|
|
try:
|
|
self.cur.execute("ALTER TABLE " + tab + " ADD COLUMN " + pole)
|
|
except:
|
|
pass
|
|
|
|
def newtable(self, txt):
|
|
try:
|
|
self.cur.execute(txt)
|
|
except:
|
|
pass
|
|
|
|
#https://nizhniy-tagil.leader-t.ru/catalog/zashchita-ruk/
|
|
#https://nizhniy-tagil.leader-t.ru/catalog/obtirochnye-materialy/
|
|
#https://nizhniy-tagil.leader-t.ru/catalog/rukavitsy/ |