fetch = int(input("enter the patient id: "))
cursor.execute("SELECT \
patients.Age AS patients, \
diabetespatients.diabetes, diabetespatients.bp, diabetespatients.bmi, diabetespatients.Status AS records \
FROM diabetespatients \
LEFT JOIN patients ON diabetespatients.pid = patients.Pid \
WHERE patients.Pid = fetch")
myresult = cursor.fetchall()
myresult
Error
1054 (42S22): Unknown column 'fetch' in 'where clause'
if I pass integer value then they working well....but if pass variable(with user input) then got an error