0

Syntax Error

UpdateT='UPDATE customer_details SET NO_OF_BIKE_TAKEN={bike_return} + NO_OF_BIKE_TAKEN WHERE ID={id}' See there is one customer whose id is 4 , and he have 5 bike which are given on rent. So first time came and given 2 bike . Later came and given 3 bike . So I want to add no of bike taken from him i.e 2 and after once again taken from him i.e 3 . So I want to update in such a manner that when ever net time he will come . That time no of bike which he gave get sum with newly returning bike. Eg id - 4 No of bike given (Given by owner) - 5 No of bike taken (Taken after Rented ) - 2 Later coming to give once again 3 No of bike taken (Taken after Rented ) - 2 + 3 . So I want newly updated value to be 5

31st Jul 2022, 4:05 AM
Om Yele
Om Yele - avatar
2 Respuestas
+ 3
I have trouble understanding what you are attempting, but I will point out that your interpolated string is missing the f in front of the first quote. UpdateT = f"UPDATE ...
31st Jul 2022, 5:16 AM
Brian
Brian - avatar
+ 1
Love you bro . Thankyou very much . It worked 👌👌👏👏☺️☺️
31st Jul 2022, 5:30 AM
Om Yele
Om Yele - avatar