Annotation of embedaddon/php/ext/sqlite/tests/sqlite_oo_015.phpt, revision 1.1

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

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