1--TEST-- 2sqlite: fetch all (array_query) 3--INI-- 4sqlite.assoc_case=0 5--SKIPIF-- 6<?php # vim:ft=php 7if (!extension_loaded("sqlite")) print "skip"; ?> 8--FILE-- 9<?php 10include "blankdb.inc"; 11 12$data = array( 13 "one", 14 "two", 15 "three" 16 ); 17 18sqlite_query("CREATE TABLE strings(a VARCHAR)", $db); 19 20foreach ($data as $str) { 21 sqlite_query("INSERT INTO strings VALUES('$str')", $db); 22} 23 24$res = sqlite_array_query("SELECT a from strings", $db, SQLITE_NUM); 25var_dump($res); 26 27$db = null; 28 29echo "DONE!\n"; 30?> 31--EXPECTF-- 32array(3) { 33 [0]=> 34 array(1) { 35 [0]=> 36 string(3) "one" 37 } 38 [1]=> 39 array(1) { 40 [0]=> 41 string(3) "two" 42 } 43 [2]=> 44 array(1) { 45 [0]=> 46 string(5) "three" 47 } 48} 49DONE! 50