1
0
mirror of https://github.com/dg/dibi.git synced 2025-07-31 19:30:30 +02:00

used PHP 5.4 syntax

This commit is contained in:
David Grudl
2015-10-06 01:39:01 +02:00
parent a32e24262f
commit 7c1f735f9b
69 changed files with 718 additions and 733 deletions

View File

@@ -10,20 +10,20 @@ date_default_timezone_set('Europe/Prague');
// CHANGE TO REAL PARAMETERS!
dibi::connect(array(
dibi::connect([
'driver' => 'sqlite3',
'database' => 'data/sample.s3db',
'formatDate' => "'Y-m-d'",
'formatDateTime' => "'Y-m-d H-i-s'",
));
]);
// generate and dump SQL
dibi::test('
INSERT INTO [mytable]', array(
INSERT INTO [mytable]', [
'id' => 123,
'date' => new DateTime('12.3.2007'),
'stamp' => new DateTime('23.1.2007 10:23'),
)
]
);
// -> INSERT INTO [mytable] ([id], [date], [stamp]) VALUES (123, '2007-03-12', '2007-01-23 10-23-00')