Example 1 — Create a Savepoint
Fixed demo of beginning a transaction and setting a marker.
<?php
echo 'begin_transaction', PHP_EOL;
echo "savepoint('sp1') => true", PHP_EOL; How It Works
- Open a transaction first.
- Call mysqli_savepoint($link, 'sp1').
- The name is just a string label on the server side.
- Sample output when connected to a demo database is a true return value.

