mirror of
https://github.com/dg/dibi.git
synced 2025-10-22 18:26:13 +02:00
- added example for dibi & Nette\Debug::consoleDump()
This commit is contained in:
28
examples/nette-debug2.php
Normal file
28
examples/nette-debug2.php
Normal file
@@ -0,0 +1,28 @@
|
||||
<h1>Nette\Debug & dibi example 2</h1>
|
||||
|
||||
|
||||
<p>Dibi can dump variables via Nette\Debug, part of Nette Framework.</p>
|
||||
|
||||
<ul>
|
||||
<li>Nette Framework: http://nettephp.com
|
||||
</ul>
|
||||
|
||||
<?php
|
||||
|
||||
require_once 'Nette/Debug.php';
|
||||
require_once '../dibi/dibi.php';
|
||||
|
||||
|
||||
// enable Nette\Debug
|
||||
Debug::enable();
|
||||
|
||||
|
||||
dibi::connect(array(
|
||||
'driver' => 'sqlite',
|
||||
'database' => 'sample.sdb',
|
||||
));
|
||||
|
||||
|
||||
|
||||
// throws error
|
||||
Debug::consoleDump( dibi::fetchAll('SELECT * FROM [customers] WHERE [customer_id] < %i', 38), '[customers]' );
|
Reference in New Issue
Block a user