If I have a bunch of queries in PHP, assuming that i'm using PDO, these queries will be executed in sequence, but PHP or MySQL will wait one query to finish before start a new one?
$sql1 = $con->prepare("some query");
$sql2 = $con->prepare("some query");
$sql3 = $con->prepare("some query");
$sql1->execute();
$sql2->execute();
$sql3->execute();
And if I use a transactional block in PDO with the same queries:
$con->beginTransaction();
Will the execution be the same?
A query is a single SQL statement that does Select, Update, Insert or Delete of rows.
A transaction is a consecutive sequence of SQL statements (from the application viewpoint) that have the "ACID" properties:
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.