I have a table called users with values Email and Balance. I want to do this query:
UPDATE users SET Balance = Balance - 1 WHERE Email = 'test2';
UPDATE users SET Balance = Balance + 1 WHERE Email = 'test3';
And when I do that it gives me this error:
Error: ER_PARSE_ERROR: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'UPDATE users SET Balance = Balance + 1 WHERE Email = 'test3'' at line 1
If I just try to update one thing, it works fine but as soon as I try to update two things at once it gives me this error. Can someone please help me I can only send one query to the database so I cannot make it two separate update queries.