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

* modified DibiException (getDbError, ...)

* fix dibi::dumpResult()
This commit is contained in:
David Grudl
2007-02-02 03:51:43 +00:00
parent a2b1036a66
commit 0c86515076
16 changed files with 218 additions and 138 deletions

View File

@@ -4,7 +4,7 @@ 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'
date_default_timezone_set('Europe/Prague');
/**
@@ -55,12 +55,13 @@ class TDateTime implements IDibiVariable
// connects to mysqli
// CHANGE TO REAL PARAMETERS!
dibi::connect(array(
'driver' => 'mysql',
'host' => 'localhost',
'username' => 'root',
'password' => 'xxx', // change to real password!
'password' => 'xxx',
'database' => 'dibi',
'charset' => 'utf8',
));
@@ -68,7 +69,7 @@ dibi::connect(array(
// generate and dump SQL
dibi::test("
INSERT INTO [test]", array(
INSERT INTO [mytable]", array(
'A' => 12,
'B' => NULL,
'C' => new TDateTime(31542), // using out class
@@ -76,4 +77,3 @@ INSERT INTO [test]", array(
));
?>