简体   繁体   English

如何在PHP和mySQL中的单个语句中运行多个更新查询

[英]How to run multiple Update Queries in single statement in PHP and mySQL

我想在单个语句中运行多个查询如何执行此操作。

you will have to use mysqli instead of mysql. 你将不得不使用mysqli而不是mysql。

Please refer to the following 请参阅以下内容

http://php.net/manual/en/book.mysqli.php http://php.net/manual/en/book.mysqli.php

http://php.net/manual/en/mysqli.multi-query.php http://php.net/manual/en/mysqli.multi-query.php

You can run multiple queries using mysqli::multi_query() 您可以使用mysqli :: multi_query()运行多个查询

as the mysql_ function family does not provide feature to execute multiple queries in once. 因为mysql_函数系列不提供一次执行多个查询的功能。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM