This question has probably been asked 5billion times, and I would think something would have been done about it but I cannot find 1 single shred of evidence of why my UPDATE is not working. Well, it half works, and half doesnt.
I have a 1 table with 13 fields. The 1st field is userid, the 2nd field is username. The last field in the table is group.
userid is an int and increments automatically. I dont care about this field.
username is a VarChar of 64
group is a tinyint of 4
This SQL query works just fine.
UPDATE login SET username = 'davessss' WHERE username = 'dave'
The Above query works.
But these are saying that there are syntax errors.
UPDATE login SET group = '1' WHERE username = 'dave'
Above query says syntax error
UPDATE login SET group = 1 WHERE username = 'dave'
Above query says syntax error.
The only difference that I can see between the 1 query that works, and the one that doesnt is that the one that works is of type VarChar and the other 2 are tinyInt. What is the problem here?