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?

Hubro
  • 56,214
  • 69
  • 228
  • 381
  • 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. – Michael J.V. Jul 26 '11 at 15:29

1 Answers1

1

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

Dor
  • 7,344
  • 4
  • 32
  • 45