mirror of
https://github.com/dg/dibi.git
synced 2025-08-05 05:37:39 +02:00
improved coding style
# Conflicts: # dibi/bridges/Tracy/Panel.php # dibi/drivers/DibiPdoDriver.php # dibi/drivers/DibiPostgreDriver.php # tests/dibi/DataSource.phpt # tests/dibi/DibiConnection.connect.phpt # tests/dibi/DibiConnection.transactions.phpt # tests/dibi/DibiFluent.cloning.phpt # tests/dibi/DibiFluent.insert.phpt # tests/dibi/DibiFluent.select.phpt # tests/dibi/DibiFluent.update.phpt # tests/dibi/DibiTranslator.conditions.phpt # tests/dibi/DibiTranslator.phpt # tests/dibi/PdoMssql.limits.phpt # tests/dibi/Postgre.like.phpt
This commit is contained in:
@@ -10,7 +10,7 @@ date_default_timezone_set('Europe/Prague');
|
||||
|
||||
|
||||
dibi::connect(array(
|
||||
'driver' => 'sqlite3',
|
||||
'driver' => 'sqlite3',
|
||||
'database' => 'data/sample.s3db',
|
||||
// enable query logging to this file
|
||||
'profiler' => array(
|
||||
@@ -26,13 +26,12 @@ try {
|
||||
$res = dibi::query('SELECT * FROM [customers] WHERE [customer_id] < ?', 5);
|
||||
|
||||
$res = dibi::query('SELECT FROM [customers] WHERE [customer_id] < ?', 38);
|
||||
|
||||
} catch (DibiException $e) {
|
||||
echo '<p>', get_class($e), ': ', $e->getMessage(), '</p>';
|
||||
}
|
||||
|
||||
|
||||
// outputs a log file
|
||||
echo "<h2>File data/log.sql:</h2>";
|
||||
echo '<h2>File data/log.sql:</h2>';
|
||||
|
||||
echo '<pre>', file_get_contents('data/log.sql'), '</pre>';
|
||||
|
Reference in New Issue
Block a user