I have been trying to make a query in MYSQL, I am doing 2 things in 1 query. My host has a Limit to queries so I need to limit the amount of queries I am doing. When I did the query I get
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
usersSET last_online=NOW() WHERE username='Welcome_234')' at line 1
I have put a semicolon ";" but it still doesn't work (This query worked in phpMyAdmin).
The code for the query is:
SELECT * FROM `users` WHERE username='Welcome_234',
UPDATE `users` SET last_online=NOW() WHERE username='Welcome_234'
I have tried many hours to figure out the problem and I still haven't found it.