Annotation of embedaddon/php/ext/pdo_sqlite/tests/pdo_sqlite_lastinsertid.phpt, revision 1.1

1.1     ! misho       1: --TEST--
        !             2: PDO_sqlite: Testing lastInsertId()
        !             3: --SKIPIF--
        !             4: <?php if (!extension_loaded('pdo_sqlite')) print 'skip not loaded'; ?>
        !             5: --FILE--
        !             6: <?php
        !             7: 
        !             8: $db = new pdo('sqlite::memory:');
        !             9: $db->query('CREATE TABLE IF NOT EXISTS foo (id INT AUTO INCREMENT, name TEXT)');
        !            10: $db->query('INSERT INTO foo VALUES (NULL, "PHP")');
        !            11: $db->query('INSERT INTO foo VALUES (NULL, "PHP6")');
        !            12: var_dump($db->query('SELECT * FROM foo'));
        !            13: var_dump($db->errorInfo());
        !            14: var_dump($db->lastInsertId());
        !            15: 
        !            16: $db->query('DROP TABLE foo');
        !            17: 
        !            18: ?>
        !            19: --EXPECTF--
        !            20: object(PDOStatement)#2 (1) {
        !            21:   ["queryString"]=>
        !            22:   %string|unicode%(17) "SELECT * FROM foo"
        !            23: }
        !            24: array(3) {
        !            25:   [0]=>
        !            26:   %string|unicode%(5) "00000"
        !            27:   [1]=>
        !            28:   NULL
        !            29:   [2]=>
        !            30:   NULL
        !            31: }
        !            32: %string|unicode%(1) "2"

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