mirror of
https://github.com/dg/dibi.git
synced 2025-10-21 17:58:02 +02:00
modified SVN properties
This commit is contained in:
@@ -1,21 +1,21 @@
|
||||
<h1>dibi metatypes example</h1>
|
||||
<pre>
|
||||
<?php
|
||||
|
||||
require_once '../dibi/dibi.php';
|
||||
|
||||
|
||||
dibi::connect(array(
|
||||
'driver' => 'sqlite',
|
||||
'database' => 'sample.sdb',
|
||||
));
|
||||
|
||||
|
||||
$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);
|
||||
<h1>dibi metatypes example</h1>
|
||||
<pre>
|
||||
<?php
|
||||
|
||||
require_once '../dibi/dibi.php';
|
||||
|
||||
|
||||
dibi::connect(array(
|
||||
'driver' => 'sqlite',
|
||||
'database' => 'sample.sdb',
|
||||
));
|
||||
|
||||
|
||||
$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);
|
||||
|
Reference in New Issue
Block a user