Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- cursor = connection.cursor()
- cursor.callproc('insert_sale', [customer_id_fetched, imei, date_of_sell, employee_id])
- # if not date_of_sell:
- # print("XDXDXDXDXDXDXDXDXDXDXDXDXDX")
- # sql_4 = "INSERT INTO SALES(CUSTOMER_ID,PRODUCT_IMEI_NO,EMPLOYEE_ID) VALUES(%s,%s,%s);"
- # cursor.execute(sql_4, [customer_id_fetched, imei, employee_id])
- #
- # else:
- # sql_4 = "INSERT INTO SALES(CUSTOMER_ID,PRODUCT_IMEI_NO,DATE_OF_SALE,EMPLOYEE_ID) VALUES(%s,%s,%s,%s);"
- # cursor.execute(sql_4, [customer_id_fetched, imei, date_of_sell, employee_id])
- connection.commit()
- cursor.close()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement