vendredi 22 mai 2015

SQLite, column NOT incrementing

I'm simply trying to make it so every time I run this query, the column: "ATTEMPTS" increments by 1. However it's not working.

Here is my query:

UPDATE MYTABLE 
   SET ATTEMPTS = ATTEMPTS + 1 
WHERE FIELDNAME = 'Hello';

I ran this once. ATTEMPTS on row where FIELDNAME is: 'Hello' went up from 0 to 1. I ran it again. ATTEMPTS remained at 1. I ran it once more. ATTEMPTS remained at 1.

It only seems to want to increment to 1. It does not go any further. It should have been 3 at that point based on how many times I ran that query.

Why is it stuck at 1?

Aucun commentaire:

Enregistrer un commentaire