1
0
mirror of https://github.com/dg/dibi.git synced 2025-08-29 16:59:49 +02:00

bugfix, enhanced error reporting, better examples

This commit is contained in:
David Grudl
2007-05-11 22:25:32 +00:00
parent d03f60c43c
commit f766827219
19 changed files with 123 additions and 230 deletions

View File

@@ -6,19 +6,18 @@ 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',
'driver' => 'sqlite',
'database' => 'sample.sdb',
));
$res = dibi::query('SELECT * FROM [mytable]');
$res = dibi::query('
SELECT * FROM [products]
INNER JOIN [orders] USING ([product_id])
INNER JOIN [customers] USING ([customer_id])
');
// get last SQL
$sql = dibi::$sql;