mirror of
https://github.com/dg/dibi.git
synced 2025-02-23 18:33:45 +01:00
26 lines
487 B
PHP
26 lines
487 B
PHP
<?php
|
|
|
|
require_once '../dibi/dibi.php';
|
|
|
|
|
|
dibi::connect(array(
|
|
'driver' => 'sqlite',
|
|
'database' => 'sample.sdb',
|
|
));
|
|
|
|
|
|
// create new substitution :blog: ==> wp_
|
|
dibi::addSubst('blog', 'wp_');
|
|
|
|
|
|
// generate and dump SQL
|
|
dibi::test("UPDATE [:blog:items] SET [text]='Hello World'");
|
|
|
|
|
|
// create new substitution :: (empty) ==> my_
|
|
dibi::addSubst('', 'my_');
|
|
|
|
|
|
// generate and dump SQL
|
|
dibi::test("UPDATE [database.::table] SET [text]='Hello World'");
|