diff --git a/examples/query-language-and-conditions.php b/examples/query-language-and-conditions.php index 660c430..79b267b 100644 --- a/examples/query-language-and-conditions.php +++ b/examples/query-language-and-conditions.php @@ -9,8 +9,8 @@ require_once '../dibi/dibi.php'; dibi::connect(array( - 'driver' => 'sqlite', - 'database' => 'data/sample.sdb', + 'driver' => 'sqlite3', + 'database' => 'data/sample.s3db', )); @@ -56,3 +56,11 @@ dibi::test(' %else 1 LIMIT 10 %end' ); // -> 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 diff --git a/examples/query-language-basic-examples.php b/examples/query-language-basic-examples.php index 790a9d1..51e63bf 100644 --- a/examples/query-language-basic-examples.php +++ b/examples/query-language-basic-examples.php @@ -11,8 +11,8 @@ date_default_timezone_set('Europe/Prague'); dibi::connect(array( - 'driver' => 'sqlite', - 'database' => 'data/sample.sdb', + 'driver' => 'sqlite3', + 'database' => 'data/sample.s3db', ));