2003-12-18 21:28:00 +00:00
|
|
|
--TEST--
|
|
|
|
sqlite-oo: sqlite_fetch_column_types
|
|
|
|
--SKIPIF--
|
|
|
|
<?php # vim:ft=php
|
|
|
|
if (!extension_loaded("sqlite")) print "skip"; ?>
|
|
|
|
--FILE--
|
|
|
|
<?php
|
|
|
|
include "blankdb_oo.inc";
|
|
|
|
|
|
|
|
$db->query("CREATE TABLE strings(a, b INTEGER, c VARCHAR(10), d)");
|
|
|
|
$db->query("INSERT INTO strings VALUES('1', '2', '3', 'abc')");
|
|
|
|
|
2004-03-26 21:16:50 +00:00
|
|
|
var_dump($db->fetchColumnTypes("strings"));
|
2003-12-18 21:28:00 +00:00
|
|
|
?>
|
|
|
|
--EXPECT--
|
|
|
|
array(4) {
|
|
|
|
["a"]=>
|
|
|
|
string(0) ""
|
|
|
|
["b"]=>
|
|
|
|
string(7) "INTEGER"
|
|
|
|
["c"]=>
|
|
|
|
string(11) "VARCHAR(10)"
|
|
|
|
["d"]=>
|
|
|
|
string(0) ""
|
|
|
|
}
|
2005-08-16 15:09:51 +00:00
|
|
|
--UEXPECT--
|
|
|
|
array(4) {
|
|
|
|
[u"a"]=>
|
|
|
|
unicode(0) ""
|
|
|
|
[u"b"]=>
|
|
|
|
unicode(7) "INTEGER"
|
|
|
|
[u"c"]=>
|
|
|
|
unicode(11) "VARCHAR(10)"
|
|
|
|
[u"d"]=>
|
|
|
|
unicode(0) ""
|
|
|
|
}
|