2009-01-05 20:55:08 +00:00
|
|
|
<h1>Nette\Debug & dibi example</h1>
|
2008-10-28 02:06:55 +00:00
|
|
|
|
|
|
|
|
2009-01-05 20:55:08 +00:00
|
|
|
<p>Dibi can display and log exceptions via Nette\Debug, part of Nette Framework.</p>
|
2008-10-28 02:06:55 +00:00
|
|
|
|
|
|
|
<ul>
|
|
|
|
<li>Nette Framework: http://nettephp.com
|
|
|
|
</ul>
|
|
|
|
|
2008-07-17 03:51:29 +00:00
|
|
|
<?php
|
|
|
|
|
|
|
|
require_once 'Nette/Debug.php';
|
|
|
|
require_once '../dibi/dibi.php';
|
|
|
|
|
2008-10-28 02:06:55 +00:00
|
|
|
|
2009-01-05 20:55:08 +00:00
|
|
|
// enable Nette\Debug
|
2008-07-17 03:51:29 +00:00
|
|
|
Debug::enable();
|
|
|
|
|
|
|
|
|
|
|
|
dibi::connect(array(
|
|
|
|
'driver' => 'sqlite',
|
|
|
|
'database' => 'sample.sdb',
|
|
|
|
));
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// throws error
|
|
|
|
dibi::query('SELECT FROM [customers] WHERE [customer_id] < %i', 38);
|