MySQLi - Release SavePoint



Syntax

bool mysqli_release_savepoint ( mysqli $link , string $name )

Definition and Usage

It removes the named savepoint from the set of savepoints of the current transaction.

Example

Try out following example −

<?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) . "\n";
   
   if (true !== ($tmp = mysqli_release_savepoint($conn, 'my'))){
      printf("[014] Got %s - [%d] %s\n", var_dump($tmp, true), 
         mysqli_errno($conn), mysqli_error($conn));
   }
   print "done!";
   
   $conn->close();
?>

The sample output of the above code should be like this −


mysqli_useful_functions.htm
Advertisements