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