1
0
mirror of https://github.com/dg/dibi.git synced 2025-09-01 02:01:48 +02:00

modified SVN properties

This commit is contained in:
David Grudl
2008-07-17 03:51:29 +00:00
parent 7f0fa2e75e
commit c0bd3761de
45 changed files with 8225 additions and 8227 deletions

View File

@@ -1,32 +1,32 @@
<h1>dibi logger example</h1>
<?php
require_once '../dibi/dibi.php';
// enable log to this file, TRUE means "log all queries"
dibi::startLogger('log.sql', TRUE);
dibi::connect(array(
'driver' => 'sqlite',
'database' => 'sample.sdb',
));
try {
$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', 38);
} catch (DibiException $e) {
echo '<p>', get_class($e), ': ', $e->getMessage(), '</p>';
}
echo "<h2>File log.sql:</h2>";
echo '<pre>', file_get_contents('log.sql'), '</pre>';
<h1>dibi logger example</h1>
<?php
require_once '../dibi/dibi.php';
// enable log to this file, TRUE means "log all queries"
dibi::startLogger('log.sql', TRUE);
dibi::connect(array(
'driver' => 'sqlite',
'database' => 'sample.sdb',
));
try {
$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', 38);
} catch (DibiException $e) {
echo '<p>', get_class($e), ': ', $e->getMessage(), '</p>';
}
echo "<h2>File log.sql:</h2>";
echo '<pre>', file_get_contents('log.sql'), '</pre>';