1
0
mirror of https://github.com/dg/dibi.git synced 2025-08-06 14:16:39 +02:00

DibiConnection: types detection + normalization is always TRUE

This commit is contained in:
David Grudl
2012-01-11 23:01:10 +01:00
parent e60dc2d2d0
commit baf08d3c71
4 changed files with 93 additions and 118 deletions

View File

@@ -20,7 +20,7 @@ dibi::connect(array(
$res = dibi::query('SELECT * FROM [customers]');
$res->setType('customer_id', Dibi::INTEGER)
->setType('added', Dibi::DATETIME, 'H:i j.n.Y');
->setType('added', Dibi::DATETIME);
Debugger::dump( $res->fetch() );
// outputs:
@@ -35,8 +35,6 @@ Debugger::dump( $res->fetch() );
// using auto-detection (works well with MySQL or other strictly typed databases)
$res = dibi::query('SELECT * FROM [customers]');
$res->detectTypes();
Debugger::dump( $res->fetch() );
// outputs:
// object(DibiRow)#3 (3) {