MySQLi - Release SavePoint
语法
bool mysqli_release_savepoint ( mysqli $link , string $name )
定义和用法
它从当前事务的保存点集中删除指定的保存点。
示例
试试下面的例子 −
<?php $servername = "localhost:3306"; $username = "root"; $password = ""; $dbname = "TUTORIALS"; $tmp = NULL; $conn = new mysqli($servername, $username, $password, $dbname); if (!$conn->real_connect($servername, $username, $password, $dbname)) { die('Connect Error (' . mysqli_connect_errno() . ') '. mysqli_connect_error()); } echo 'Success... ' . mysqli_get_host_info($conn) . " "; if (true !== ($tmp = mysqli_release_savepoint($conn, 'my'))){ printf("[014] Got %s - [%d] %s ", var_dump($tmp, true), mysqli_errno($conn), mysqli_error($conn)); } print "done!"; $conn->close(); ?>
上述代码的示例输出应该是这样的 −