1
0
mirror of https://github.com/dg/dibi.git synced 2025-08-01 03:40:22 +02:00

updated examples

This commit is contained in:
David Grudl
2012-12-16 19:31:37 +01:00
parent 322a110f75
commit 10fdecfc13
2 changed files with 12 additions and 4 deletions

View File

@@ -9,8 +9,8 @@ require_once '../dibi/dibi.php';
dibi::connect(array( dibi::connect(array(
'driver' => 'sqlite', 'driver' => 'sqlite3',
'database' => 'data/sample.sdb', 'database' => 'data/sample.s3db',
)); ));
@@ -56,3 +56,11 @@ dibi::test('
%else 1 LIMIT 10 %end' %else 1 LIMIT 10 %end'
); );
// -> SELECT * FROM customers WHERE LIMIT 10 // -> SELECT * FROM customers WHERE LIMIT 10
// IF()
dibi::test('UPDATE products SET', array(
'price' => array('IF(price_fixed, price, ?)', 123),
));
// -> SELECT * FROM customers WHERE LIMIT 10

View File

@@ -11,8 +11,8 @@ date_default_timezone_set('Europe/Prague');
dibi::connect(array( dibi::connect(array(
'driver' => 'sqlite', 'driver' => 'sqlite3',
'database' => 'data/sample.sdb', 'database' => 'data/sample.s3db',
)); ));