1
0
mirror of https://github.com/dg/dibi.git synced 2025-08-29 16:59:49 +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

38
examples/dump.php Normal file
View File

@@ -0,0 +1,38 @@
<?php
require_once '../dibi/dibi.php';
if (function_exists('date_default_timezone_set'))
date_default_timezone_set('Europe/Prague');
// CHANGE TO REAL PARAMETERS!
dibi::connect(array(
'driver' => 'mysql',
'host' => 'localhost',
'username' => 'root',
'password' => 'xxx',
'database' => 'dibi',
'charset' => 'utf8',
));
$res = dibi::query('SELECT * FROM [mytable]');
// get last SQL
$sql = dibi::$sql;
// dump it
echo '<h1>dibi::dump()</h1>';
dibi::dump($sql);
// dump result table
echo '<h1>dibi::dumpResult()</h1>';
dibi::dumpResult($res);