Abhi
Abhi

Reputation: 5561

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

I want to run the multiple queries in single statement how to do this.

Upvotes: 2

Views: 5203

Answers (2)

Shakti Singh
Shakti Singh

Reputation: 86346

You can run multiple queries using mysqli::multi_query()

as the mysql_ function family does not provide feature to execute multiple queries in once.

Upvotes: 4

Oliver M Grech
Oliver M Grech

Reputation: 3171

you will have to use mysqli instead of mysql.

Please refer to the following

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

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

Upvotes: 4

Related Questions