1--TEST-- 2SQLite3::query Skip all cleanup 3--SKIPIF-- 4<?php require_once(dirname(__FILE__) . '/skipif.inc'); ?> 5--FILE-- 6<?php 7 8require_once(dirname(__FILE__) . '/new_db.inc'); 9define('TIMENOW', time()); 10 11echo "Creating Table\n"; 12var_dump($db->exec('CREATE TABLE test (time INTEGER, id STRING)')); 13 14echo "INSERT into table\n"; 15var_dump($db->exec("INSERT INTO test (time, id) VALUES (" . TIMENOW . ", 'a')")); 16var_dump($db->exec("INSERT INTO test (time, id) VALUES (" . TIMENOW . ", 'b')")); 17 18echo "SELECTING results\n"; 19$results = $db->query("SELECT * FROM test ORDER BY id ASC"); 20while ($result = $results->fetchArray(SQLITE3_NUM)) 21{ 22 var_dump($result); 23} 24echo "Done\n"; 25?> 26--EXPECTF-- 27Creating Table 28bool(true) 29INSERT into table 30bool(true) 31bool(true) 32SELECTING results 33array(2) { 34 [0]=> 35 int(%d) 36 [1]=> 37 string(1) "a" 38} 39array(2) { 40 [0]=> 41 int(%d) 42 [1]=> 43 string(1) "b" 44} 45Done 46