0

I like assembling multiple SQL queries into one string and executing them simultaneously to ensure that they are executed atomically. I can't seem to do this with PDO like I could with the MySQL functions though.

Any thoughts?

1
  • If you want atomicity, use transactions and prepared statements rather than trying to issue multiple queries delimited by semicolon. Prepared statements should also execute faster. Jul 26, 2011 at 15:29

1 Answer 1

1

Sending at once multiple queries to the MySQL server - won't make them atomic. For atomicity, use transactions. Read: ACID @ wikipedia

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.