mirror of
https://github.com/dg/dibi.git
synced 2025-07-30 19:00:13 +02:00
improved coding style
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