Python , Mysql , MysqlConnector
import mysql.connector as sql
def Withdrawal():
cn = sql.connect(host="localhost" ,
user="root",
passwd="toor",
database="Python_Bank")
mycursor = cn.cursor()
Withdraw = int(input(" Amount to be withdraw : "))
Pin = input("Enter Your 4 Digit Pin : ")
query = "Update login set Balance = Balance-'+Withdraw+' where Pin = '+Pin+' and Balance > '+Withdraw+'"
mycursor.execute(query)
print("\n Transaction Successfull ")
Error : 1292 (22007): Truncated incorrect DOUBLE value: '+Withdraw+'
desc login;
