$db->transaction(function() use ($db) {
$db->query("INSERT INTO table ...");
$db->query("UPDATE table ...");
$db->query("DELETE FROM table ...");
})
public transaction ( callable $process ) : boolean | ||
$process | callable | callable structure - closure function or class with __invoke() method |
return | boolean |