mirror of
https://github.com/dg/dibi.git
synced 2025-01-17 22:28:50 +01:00
31 lines
470 B
PHP
31 lines
470 B
PHP
<h1>dibi dump example</h1>
|
|
<?php
|
|
|
|
require_once '../dibi/dibi.php';
|
|
|
|
|
|
dibi::connect(array(
|
|
'driver' => 'sqlite',
|
|
'database' => 'sample.sdb',
|
|
));
|
|
|
|
|
|
|
|
$res = dibi::query('
|
|
SELECT * FROM [products]
|
|
INNER JOIN [orders] USING ([product_id])
|
|
INNER JOIN [customers] USING ([customer_id])
|
|
');
|
|
|
|
|
|
echo '<h2>dibi::dump()</h2>';
|
|
|
|
// dump last query (dibi::$sql)
|
|
dibi::dump();
|
|
|
|
|
|
// dump result table
|
|
echo '<h2>DibiResult::dump()</h2>';
|
|
|
|
$res->dump();
|