1
0
mirror of https://github.com/dg/dibi.git synced 2025-08-03 12:47:33 +02:00

* better datetime converting in DibiResult (see http://forum.dibiphp.com/viewtopic.php?pid=2331)

* added support for Nette_Debug
* renamed NObject -> Nette_Object (Nette::Object in PHP 5.3)
This commit is contained in:
David Grudl
2008-04-03 12:40:04 +00:00
parent 2632953541
commit 24bf999cd9
23 changed files with 121 additions and 35 deletions

View File

@@ -15,5 +15,7 @@ $res = dibi::query('SELECT * FROM [customers]');
// auto-convert this column to integer
$res->setType('customer_id', Dibi::FIELD_INTEGER);
$res->setType('added', Dibi::FIELD_DATETIME, 'H:i j.n.Y');
$row = $res->fetch();
var_dump($row);

19
examples/nette-debug.php Normal file
View File

@@ -0,0 +1,19 @@
<h1>Nette::Debug && dibi example</h1>
<?php
require_once '../dibi/dibi.php';
require_once 'Nette/Debug.php';
Nette_Debug::enable();
dibi::connect(array(
'driver' => 'sqlite',
'database' => 'sample.sdb',
));
// throws error
dibi::query('SELECT FROM [customers] WHERE [customer_id] < %i', 38);

Binary file not shown.