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:
@@ -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',
|
||||
));
|
||||
|
||||
|
Reference in New Issue
Block a user