I'm using flask to create my api and testing select query... it works fine in first select, but if i change records manualy, my select still returning old values...
My endpoint code:
def checkAuth():
cursor = conn.cursor()
data = request.get_json()
email = data['email']
passw = data['passw']
query = f"SELECT COUNT(id), email, passw, stat FROM users WHERE email = '{email}' AND passw = '{passw}'"
cursor.execute(query)
res = cursor.fetchone()
cursor.close()
rows_count = res[0]
if rows_count < 1:
return "Error"
return jsonify(res)
First it return "[ 1, "test", "$2y$10fa1841ee3e15a782d0371096caffeada2VXh/Y5/afFgRyYWenuuTfrsK", 1 ] "
But if i change stat to 0 and request this endpoint again, it return the same string, withou changint the last index value to 0... it only changes if i close my api and open again...