Annotation of embedaddon/php/ext/sqlite3/tests/bug45798.phpt, revision 1.1

1.1     ! misho       1: --TEST--
        !             2: Bug #45798 (sqlite3 doesn't notice if variable was bound)
        !             3: --SKIPIF--
        !             4: <?php require_once(dirname(__FILE__) . '/skipif.inc'); ?>
        !             5: --FILE--
        !             6: <?php
        !             7: 
        !             8: require_once(dirname(__FILE__) . '/new_db.inc');
        !             9: 
        !            10: $db->exec('CREATE TABLE test (time INTEGER, id STRING)');
        !            11: 
        !            12: $db->exec("INSERT INTO test (time, id) VALUES (" . time() . ", 'a')");
        !            13: $db->exec("INSERT INTO test (time, id) VALUES (" . time() . ", 'b')");
        !            14: 
        !            15: $stmt = $db->prepare("SELECT * FROM test WHERE id = ? ORDER BY id ASC");
        !            16: 
        !            17: $stmt->bindParam(1, $foo, SQLITE3_TEXT);
        !            18: $results = $stmt->execute();
        !            19: 
        !            20: while ($result = $results->fetchArray(SQLITE3_NUM)) {
        !            21:        var_dump($result);
        !            22: }
        !            23: 
        !            24: $results->finalize();
        !            25: 
        !            26: $db->close();
        !            27: 
        !            28: print "done";
        !            29: 
        !            30: ?>
        !            31: --EXPECT--
        !            32: done

FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>