mirror of
https://github.com/dg/dibi.git
synced 2025-08-29 00:39:50 +02:00
modified SVN properties
This commit is contained in:
@@ -1,28 +1,28 @@
|
||||
<h1>dibi transaction example</h1>
|
||||
<pre>
|
||||
<?php
|
||||
|
||||
require_once '../dibi/dibi.php';
|
||||
|
||||
|
||||
dibi::connect(array(
|
||||
'driver' => 'sqlite',
|
||||
'database' => 'sample.sdb',
|
||||
));
|
||||
|
||||
|
||||
echo "<h2>Before:</h2>\n";
|
||||
dibi::query('SELECT * FROM [products]')->dump();
|
||||
|
||||
|
||||
|
||||
dibi::begin();
|
||||
dibi::query('INSERT INTO [products]', array(
|
||||
'title' => 'Test product',
|
||||
));
|
||||
dibi::rollback(); // or dibi::commit();
|
||||
|
||||
|
||||
|
||||
echo "<h2>After:</h2>\n";
|
||||
<h1>dibi transaction example</h1>
|
||||
<pre>
|
||||
<?php
|
||||
|
||||
require_once '../dibi/dibi.php';
|
||||
|
||||
|
||||
dibi::connect(array(
|
||||
'driver' => 'sqlite',
|
||||
'database' => 'sample.sdb',
|
||||
));
|
||||
|
||||
|
||||
echo "<h2>Before:</h2>\n";
|
||||
dibi::query('SELECT * FROM [products]')->dump();
|
||||
|
||||
|
||||
|
||||
dibi::begin();
|
||||
dibi::query('INSERT INTO [products]', array(
|
||||
'title' => 'Test product',
|
||||
));
|
||||
dibi::rollback(); // or dibi::commit();
|
||||
|
||||
|
||||
|
||||
echo "<h2>After:</h2>\n";
|
||||
dibi::query('SELECT * FROM [products]')->dump();
|
Reference in New Issue
Block a user