Skip to content

Commit ed1a17a

Browse files
committed
Update
1 parent 062b9af commit ed1a17a

File tree

1 file changed

+21
-1
lines changed

1 file changed

+21
-1
lines changed

ext/sqlite/tests/sqlite_013.phpt

Lines changed: 21 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,8 @@ foreach ($data as $str) {
2020
sqlite_query("INSERT INTO strings VALUES('${str[0]}','${str[1]}')", $db);
2121
}
2222

23-
$r = sqlite_unbuffered_query("SELECT a, b from strings", $db);
23+
echo "====BUFFERED====\n";
24+
$r = sqlite_query("SELECT a, b from strings", $db);
2425
while (sqlite_has_more($r)) {
2526
var_dump(sqlite_current($r, SQLITE_NUM));
2627
var_dump(sqlite_column($r, 0));
@@ -29,9 +30,19 @@ while (sqlite_has_more($r)) {
2930
var_dump(sqlite_column($r, 'b'));
3031
sqlite_next($r);
3132
}
33+
echo "====UNBUFFERED====\n";
34+
$r = sqlite_unbuffered_query("SELECT a, b from strings", $db);
35+
while (sqlite_has_more($r)) {
36+
var_dump(sqlite_column($r, 0));
37+
var_dump(sqlite_column($r, 'b'));
38+
var_dump(sqlite_column($r, 1));
39+
var_dump(sqlite_column($r, 'a'));
40+
sqlite_next($r);
41+
}
3242
echo "DONE!\n";
3343
?>
3444
--EXPECT--
45+
====BUFFERED====
3546
array(2) {
3647
[0]=>
3748
string(3) "one"
@@ -52,4 +63,13 @@ string(5) "three"
5263
string(4) "four"
5364
string(5) "three"
5465
string(4) "four"
66+
====UNBUFFERED====
67+
string(3) "one"
68+
string(3) "two"
69+
NULL
70+
NULL
71+
string(5) "three"
72+
string(4) "four"
73+
NULL
74+
NULL
5575
DONE!

0 commit comments

Comments
 (0)