Answer the question
In order to leave comments, you need to log in
Is it possible to do UPDATE + INSERT in one query?
Made a request:
UPDATE `users` SET `balance` = balance + 11 WHERE `id` = '1' AND (INSERT INTO `payments` (`status_id`, `user_id`, `description`, `currency_id`, `amount`, `bonus_amount`, `sum`) VALUES ('2', '1', 'TEST', 643, 11, 22, 11)) LIMIT 1
#1064 - You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'INTO `payments` (`status_id`, `user_id`, `description`, `currency_id`, `amo' at line 1
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question