import pymysql


def conndb():
    conn = pymysql.connect(host='maria', user='root', passwd='qwer1234', db='test', cursorclass=pymysql.cursors.DictCursor)
    return conn

def create_table():
    conn=conndb()
    c = conn.cursor()
    sql=('''
    CREATE TABLE if not exists products(
        products_id int,
        products_name varchar(50),
        price int default 0,
        description text,
        picture_url varchar(500),
        CONSTANT PRIMARYKEY (product_id) 
    ''')
    c.execute(sql)
    conn.commit()
    conn.close()
    
def insert_data():
    data=[]
    conn=conndb()
    c = conn.cursur()
    input("")
    sql = 'insert into products values(%s,%s,%s,%s,%s,%s)'
    c.executemany(sql)
    


def listdata():
    pass

def select_data():
    conn=conndb
    c=conn.cursor()
    sql='select * from stocks'
    c.execute(sql)
    print(c.fetchall())
    conn.close()

def     update_data():
    pass


def deletedata():
    input_file=''
    conn=conndb()
    cur=conn.cursor()
    sql = "delete from products"
    cur.execute(sql)

0db596499c3a9d0ab32e345042529133eccebe4b
<mask token>


def create_table():
    conn = conndb()
    c = conn.cursor()
    sql = """
    CREATE TABLE if not exists products(
        products_id int,
        products_name varchar(50),
        price int default 0,
        description text,
        picture_url varchar(500),
        CONSTANT PRIMARYKEY (product_id) 
    """
    c.execute(sql)
    conn.commit()
    conn.close()


def insert_data():
    data = []
    conn = conndb()
    c = conn.cursur()
    input('')
    sql = 'insert into products values(%s,%s,%s,%s,%s,%s)'
    c.executemany(sql)


<mask token>


def update_data():
    pass


<mask token>

<mask token>


def create_table():
    conn = conndb()
    c = conn.cursor()
    sql = """
    CREATE TABLE if not exists products(
        products_id int,
        products_name varchar(50),
        price int default 0,
        description text,
        picture_url varchar(500),
        CONSTANT PRIMARYKEY (product_id) 
    """
    c.execute(sql)
    conn.commit()
    conn.close()


def insert_data():
    data = []
    conn = conndb()
    c = conn.cursur()
    input('')
    sql = 'insert into products values(%s,%s,%s,%s,%s,%s)'
    c.executemany(sql)


def listdata():
    pass


<mask token>


def update_data():
    pass


<mask token>

<mask token>


def conndb():
    conn = pymysql.connect(host='maria', user='root', passwd='qwer1234', db
        ='test', cursorclass=pymysql.cursors.DictCursor)
    return conn


def create_table():
    conn = conndb()
    c = conn.cursor()
    sql = """
    CREATE TABLE if not exists products(
        products_id int,
        products_name varchar(50),
        price int default 0,
        description text,
        picture_url varchar(500),
        CONSTANT PRIMARYKEY (product_id) 
    """
    c.execute(sql)
    conn.commit()
    conn.close()


def insert_data():
    data = []
    conn = conndb()
    c = conn.cursur()
    input('')
    sql = 'insert into products values(%s,%s,%s,%s,%s,%s)'
    c.executemany(sql)


def listdata():
    pass


<mask token>


def update_data():
    pass


<mask token>

<mask token>


def conndb():
    conn = pymysql.connect(host='maria', user='root', passwd='qwer1234', db
        ='test', cursorclass=pymysql.cursors.DictCursor)
    return conn


def create_table():
    conn = conndb()
    c = conn.cursor()
    sql = """
    CREATE TABLE if not exists products(
        products_id int,
        products_name varchar(50),
        price int default 0,
        description text,
        picture_url varchar(500),
        CONSTANT PRIMARYKEY (product_id) 
    """
    c.execute(sql)
    conn.commit()
    conn.close()


def insert_data():
    data = []
    conn = conndb()
    c = conn.cursur()
    input('')
    sql = 'insert into products values(%s,%s,%s,%s,%s,%s)'
    c.executemany(sql)


def listdata():
    pass


def select_data():
    conn = conndb
    c = conn.cursor()
    sql = 'select * from stocks'
    c.execute(sql)
    print(c.fetchall())
    conn.close()


def update_data():
    pass


def deletedata():
    input_file = ''
    conn = conndb()
    cur = conn.cursor()
    sql = 'delete from products'
    cur.execute(sql)

import pymysql


def conndb():
    conn = pymysql.connect(host='maria', user='root', passwd='qwer1234', db='test', cursorclass=pymysql.cursors.DictCursor)
    return conn

def create_table():
    conn=conndb()
    c = conn.cursor()
    sql=('''
    CREATE TABLE if not exists products(
        products_id int,
        products_name varchar(50),
        price int default 0,
        description text,
        picture_url varchar(500),
        CONSTANT PRIMARYKEY (product_id) 
    ''')
    c.execute(sql)
    conn.commit()
    conn.close()
    
def insert_data():
    data=[]
    conn=conndb()
    c = conn.cursur()
    input("")
    sql = 'insert into products values(%s,%s,%s,%s,%s,%s)'
    c.executemany(sql)
    


def listdata():
    pass

def select_data():
    conn=conndb
    c=conn.cursor()
    sql='select * from stocks'
    c.execute(sql)
    print(c.fetchall())
    conn.close()

def     update_data():
    pass


def deletedata():
    input_file=''
    conn=conndb()
    cur=conn.cursor()
    sql = "delete from products"
    cur.execute(sql)
