mirror of
https://github.com/dg/dibi.git
synced 2025-08-01 03:40:22 +02:00
updated examples
This commit is contained in:
@@ -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
|
||||||
|
@@ -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',
|
||||||
));
|
));
|
||||||
|
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user