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

+ rewritten support for logging & error handling

+ modifier %sn
* modifier %sql
* changed modifier behaviour: NULL is always 'NULL'
This commit is contained in:
David Grudl
2007-01-29 05:08:52 +00:00
parent ac980fe8c9
commit 6536dfb7dd
17 changed files with 800 additions and 181 deletions

View File

@@ -4,9 +4,20 @@
require_once '../dibi/dibi.php';
// required since PHP 5.1.0
if (function_exists('date_default_timezone_set'))
date_default_timezone_set('Europe/Prague'); // or 'GMT'
// enable log to this file
dibi::$logFile = 'log.sql';
// append mode
dibi::$logMode = 'a';
// log all queries
dibi::$logAll = TRUE;
// mysql
dibi::connect(array(
@@ -14,7 +25,7 @@ dibi::connect(array(
'host' => 'localhost',
'username' => 'root',
'password' => 'xxx', // change to real password!
'database' => 'test',
'database' => 'xxx',
'charset' => 'utf8',
));