summaryrefslogtreecommitdiff
path: root/ext/sqlite/tests/sqlite_008.phpt
diff options
context:
space:
mode:
authorMarcus Boerger <helly@php.net>2003-04-27 11:29:39 +0000
committerMarcus Boerger <helly@php.net>2003-04-27 11:29:39 +0000
commit88ef12964b1873b0a35f84f39ca0473fd251abb9 (patch)
tree86ac4e91baf890ecfa860c36fde0a63c1f1a0b3e /ext/sqlite/tests/sqlite_008.phpt
parentffe4ae85bb0865d0e158f361b8f43b43c57f6c43 (diff)
downloadphp-git-88ef12964b1873b0a35f84f39ca0473fd251abb9.tar.gz
Add more tests
Diffstat (limited to 'ext/sqlite/tests/sqlite_008.phpt')
-rwxr-xr-xext/sqlite/tests/sqlite_008.phpt41
1 files changed, 41 insertions, 0 deletions
diff --git a/ext/sqlite/tests/sqlite_008.phpt b/ext/sqlite/tests/sqlite_008.phpt
new file mode 100755
index 0000000000..3d6b459f97
--- /dev/null
+++ b/ext/sqlite/tests/sqlite_008.phpt
@@ -0,0 +1,41 @@
+--TEST--
+sqlite: fetch all
+--SKIPIF--
+<?php # vim:ft=php
+if (!extension_loaded("sqlite")) print "skip"; ?>
+--FILE--
+<?php
+include "blankdb.inc";
+
+$data = array(
+ "one",
+ "two",
+ "three"
+ );
+
+sqlite_query("CREATE TABLE strings(a VARCHAR)", $db);
+
+foreach ($data as $str) {
+ sqlite_query("INSERT INTO strings VALUES('$str')", $db);
+}
+
+$r = sqlite_query("SELECT a from strings", $db);
+while ($row = sqlite_fetch_array($r, SQLITE_NUM)) {
+ var_dump($row);
+}
+echo "DONE!\n";
+?>
+--EXPECT--
+array(1) {
+ [0]=>
+ string(3) "one"
+}
+array(1) {
+ [0]=>
+ string(3) "two"
+}
+array(1) {
+ [0]=>
+ string(5) "three"
+}
+DONE!