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

北慕城南 提交于 2019-12-02 18:49:47

问题


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:


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



来源:https://stackoverflow.com/questions/6832501/is-there-an-equivalent-for-mysqls-multi-query-in-pdo

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!