1
0
mirror of https://github.com/dg/dibi.git synced 2025-08-05 05:37:39 +02:00

examples: dibi:: replaced with $dibi->

This commit is contained in:
David Grudl
2018-04-17 10:03:43 +02:00
parent cec699af0f
commit 4049ea4717
17 changed files with 76 additions and 76 deletions

View File

@@ -11,7 +11,7 @@ if (@!include __DIR__ . '/../vendor/autoload.php') {
date_default_timezone_set('Europe/Prague');
dibi::connect([
$dibi = new Dibi\Connection([
'driver' => 'sqlite3',
'database' => 'data/sample.s3db',
// enable query logging to this file
@@ -23,11 +23,11 @@ dibi::connect([
try {
$res = dibi::query('SELECT * FROM [customers] WHERE [customer_id] = ?', 1);
$res = $dibi->query('SELECT * FROM [customers] WHERE [customer_id] = ?', 1);
$res = dibi::query('SELECT * FROM [customers] WHERE [customer_id] < ?', 5);
$res = $dibi->query('SELECT * FROM [customers] WHERE [customer_id] < ?', 5);
$res = dibi::query('SELECT FROM [customers] WHERE [customer_id] < ?', 38);
$res = $dibi->query('SELECT FROM [customers] WHERE [customer_id] < ?', 38);
} catch (Dibi\Exception $e) {
echo '<p>', get_class($e), ': ', $e->getMessage(), '</p>';
}