blob: 325d79865346ba325621a905e87b3de412e79ec6 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
|
--TEST--
sqlite: Simple insert/select
--INI--
sqlite.assoc_case=0
--SKIPIF--
<?php # vim:ft=php
if (!extension_loaded("sqlite")) print "skip"; ?>
--FILE--
<?php
include "blankdb.inc";
sqlite_query("CREATE TABLE foo(c1 date, c2 time, c3 varchar(64))", $db);
sqlite_query("INSERT INTO foo VALUES ('2002-01-02', '12:49:00', NULL)", $db);
$r = sqlite_query("SELECT * from foo", $db);
var_dump(sqlite_fetch_array($r));
sqlite_close($db);
?>
--EXPECT--
array(6) {
[0]=>
string(10) "2002-01-02"
["c1"]=>
string(10) "2002-01-02"
[1]=>
string(8) "12:49:00"
["c2"]=>
string(8) "12:49:00"
[2]=>
NULL
["c3"]=>
NULL
}
--UEXPECT--
array(6) {
[0]=>
unicode(10) "2002-01-02"
[u"c1"]=>
unicode(10) "2002-01-02"
[1]=>
unicode(8) "12:49:00"
[u"c2"]=>
unicode(8) "12:49:00"
[2]=>
NULL
[u"c3"]=>
NULL
}
|