Annotation of embedaddon/php/ext/oci8/tests/prefetch_old.phpt, revision 1.1

1.1     ! misho       1: --TEST--
        !             2: ocisetprefetch()
        !             3: --SKIPIF--
        !             4: <?php if (!extension_loaded('oci8')) die("skip no oci8 extension"); ?>
        !             5: --FILE--
        !             6: <?php
        !             7: 
        !             8: require(dirname(__FILE__)."/connect.inc");
        !             9: 
        !            10: $stmtarray = array(
        !            11:     "drop table prefetch_old_tab",
        !            12:     "create table prefetch_old_tab (id number, value number)",
        !            13:     "insert into prefetch_old_tab (id, value) values (1,1)",
        !            14:     "insert into prefetch_old_tab (id, value) values (1,1)",
        !            15:     "insert into prefetch_old_tab (id, value) values (1,1)",
        !            16: );
        !            17: 
        !            18: oci8_test_sql_execute($c, $stmtarray);
        !            19: 
        !            20: // Run Test
        !            21: 
        !            22: if (!ocicommit($c)) {
        !            23:        die("ocicommit() failed!\n");
        !            24: }
        !            25: 
        !            26: $select_sql = "select * from prefetch_old_tab";
        !            27: 
        !            28: if (!($s = ociparse($c, $select_sql))) {
        !            29:        die("ociparse(select) failed!\n");
        !            30: }
        !            31: 
        !            32: var_dump(ocisetprefetch($s, 10));
        !            33: 
        !            34: if (!ociexecute($s)) {
        !            35:        die("ociexecute(select) failed!\n");
        !            36: }
        !            37: 
        !            38: var_dump(ocifetch($s));
        !            39: var_dump(ocirowcount($s));
        !            40: 
        !            41: 
        !            42: // Cleanup
        !            43: 
        !            44: $stmtarray = array(
        !            45:     "drop table prefetch_old_tab"
        !            46: );
        !            47: 
        !            48: oci8_test_sql_execute($c, $stmtarray);
        !            49:        
        !            50: echo "Done\n";
        !            51: ?>
        !            52: --EXPECT--
        !            53: bool(true)
        !            54: bool(true)
        !            55: int(1)
        !            56: Done

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