⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 sqlite_025.phpt

📁 PHP v6.0 For Linux 运行环境:Win9X/ WinME/ WinNT/ Win2K/ WinXP
💻 PHPT
字号:
--TEST--sqlite: sqlite_fetch_object in a loop--INI--sqlite.assoc_case=0--SKIPIF--<?php # vim:ft=phpif (!extension_loaded("sqlite")) print "skip"; ?>--FILE--<?php include "blankdb.inc";sqlite_query($db, "CREATE TABLE strings(a)");foreach (array("one", "two", "three") as $str) {	sqlite_query($db, "INSERT INTO strings VALUES('$str')");}$res = sqlite_query("SELECT * FROM strings", $db);while (($obj = sqlite_fetch_object($res))) {	var_dump($obj);}sqlite_close($db);?>--EXPECTF--object(stdClass)#1 (1) {  ["a"]=>  string(3) "one"}object(stdClass)#2 (1) {  ["a"]=>  string(3) "two"}object(stdClass)#1 (1) {  ["a"]=>  string(5) "three"}--UEXPECTF--object(stdClass)#1 (1) {  [u"a"]=>  unicode(3) "one"}object(stdClass)#2 (1) {  [u"a"]=>  unicode(3) "two"}object(stdClass)#1 (1) {  [u"a"]=>  unicode(5) "three"}

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -