Search code examples
phpmysqlpdomulti-query

Is there an equivalent for MySQL's "multi_query()" in PDO?


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?


Solution

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