1--TEST-- 2SQLite3Stmt::getSQL test 3--EXTENSIONS-- 4sqlite3 5--FILE-- 6<?php 7 8require_once(__DIR__ . '/new_db.inc'); 9 10$db->enableExceptions(true); 11 12$stmt = $db->prepare('SELECT :a, :b, ?;'); 13 14$stmt->bindValue(':a', 42); 15$stmt->bindValue(':b', 'php'); 16$stmt->bindValue(3, 43); 17 18echo "Getting non-expanded SQL statement\n"; 19var_dump($stmt->getSQL(false)); 20 21echo "Execute statement\n"; 22var_dump($res = $stmt->execute()); 23 24echo "Statement result\n"; 25var_dump($res->fetchArray(SQLITE3_NUM)); 26 27echo "Closing DB\n"; 28var_dump($db->close()); 29 30echo "Done\n"; 31?> 32--EXPECT-- 33Getting non-expanded SQL statement 34string(17) "SELECT :a, :b, ?;" 35Execute statement 36object(SQLite3Result)#3 (0) { 37} 38Statement result 39array(3) { 40 [0]=> 41 int(42) 42 [1]=> 43 string(3) "php" 44 [2]=> 45 int(43) 46} 47Closing DB 48bool(true) 49Done 50