Advertisement
abrar1

Untitled

Dec 11th, 2020
185
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.71 KB | None | 0 0
  1. cursor = connection.cursor()
  2. cursor.callproc('insert_sale', [customer_id_fetched, imei, date_of_sell, employee_id])
  3.  
  4. # if not date_of_sell:
  5. # print("XDXDXDXDXDXDXDXDXDXDXDXDXDX")
  6. # sql_4 = "INSERT INTO SALES(CUSTOMER_ID,PRODUCT_IMEI_NO,EMPLOYEE_ID) VALUES(%s,%s,%s);"
  7. # cursor.execute(sql_4, [customer_id_fetched, imei, employee_id])
  8. #
  9. # else:
  10. # sql_4 = "INSERT INTO SALES(CUSTOMER_ID,PRODUCT_IMEI_NO,DATE_OF_SALE,EMPLOYEE_ID) VALUES(%s,%s,%s,%s);"
  11. # cursor.execute(sql_4, [customer_id_fetched, imei, date_of_sell, employee_id])
  12.  
  13. connection.commit()
  14. cursor.close()
  15.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement