'sqlite',
'database' => 'sample.sdb',
));
// generate user-level errors
dibi::$throwExceptions = FALSE;
echo '
User-level errors
';
$res = dibi::query('SELECT * FROM [customers] WHERE [customer_id] = %i', 1);
$res = dibi::query('SELECT * FROM [customers] WHERE [customer_id] < %i', 5);
$res = dibi::query('SELECT FROM [customers] WHERE [customer_id] < %i', 5);
echo "
See file ", dibi::$logFile;
// generate DibiException
dibi::$throwExceptions = TRUE;
echo 'DibiException
';
try {
$res = dibi::query('SELECT FROM [customers] WHERE [customer_id] < %i', 38);
} catch (DibiException $e) {
echo '', $e, '
';
echo '$e->getSql()
';
$sql = $e->getSql();
echo "SQL: $sql\n";
echo '$e->getDbError()
';
$error = $e->getDbError();
echo '';
print_r($error);
echo '
';
}