2003-04-17 01:29:45 +00:00
|
|
|
--TEST--
|
2003-04-18 19:22:49 +00:00
|
|
|
sqlite: Simple insert/select
|
2003-05-01 13:29:11 +00:00
|
|
|
--INI--
|
|
|
|
sqlite.assoc_case=0
|
2003-04-17 01:29:45 +00:00
|
|
|
--SKIPIF--
|
2003-04-18 19:22:49 +00:00
|
|
|
<?php # vim:ft=php
|
|
|
|
if (!extension_loaded("sqlite")) print "skip"; ?>
|
2003-04-17 01:29:45 +00:00
|
|
|
--FILE--
|
|
|
|
<?php
|
2003-04-18 19:22:49 +00:00
|
|
|
include "blankdb.inc";
|
2003-04-17 01:29:45 +00:00
|
|
|
|
2003-04-18 19:22:49 +00:00
|
|
|
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));
|
2003-12-05 02:12:21 +00:00
|
|
|
sqlite_close($db);
|
2003-04-17 01:29:45 +00:00
|
|
|
?>
|
|
|
|
--EXPECT--
|
2003-04-18 20:53:18 +00:00
|
|
|
array(6) {
|
2003-04-18 19:22:49 +00:00
|
|
|
[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
|
|
|
|
}
|