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

1.1     ! misho       1: --TEST--
        !             2: bind LONG RAW field
        !             3: --SKIPIF--
        !             4: <?php
        !             5: $target_dbs = array('oracledb' => true, 'timesten' => false);  // test runs on these DBs
        !             6: require(dirname(__FILE__).'/skipif.inc');
        !             7: ?> 
        !             8: --FILE--
        !             9: <?php
        !            10: 
        !            11: require dirname(__FILE__)."/connect.inc";
        !            12: 
        !            13: $stmt = oci_parse($c, "create table phptestlngraw( id number(10), fileimage long raw)");
        !            14: oci_execute($stmt);
        !            15: 
        !            16: $stmt = oci_parse ($c, "insert into phptestlngraw (id, fileimage) values (:id, :fileimage)");
        !            17: $i=1;
        !            18: $fileimage = file_get_contents( dirname(__FILE__)."/test.gif");
        !            19: 
        !            20: oci_bind_by_name( $stmt, ":id", $i, -1);
        !            21: oci_bind_by_name( $stmt, ":fileimage", $fileimage, -1, SQLT_LBI);
        !            22: oci_execute($stmt, OCI_DEFAULT);
        !            23: oci_commit($c);
        !            24: 
        !            25: $stmt = oci_parse($c, "SELECT fileimage FROM phptestlngraw");
        !            26: oci_execute($stmt);
        !            27: 
        !            28: $row = oci_fetch_row($stmt);
        !            29: var_dump(md5($row[0]));
        !            30: var_dump(strlen($row[0]));
        !            31: 
        !            32: $stmt = oci_parse($c, "drop table phptestlngraw");
        !            33: oci_execute($stmt);
        !            34: 
        !            35: echo "Done\n";
        !            36: 
        !            37: ?>
        !            38: --EXPECT--
        !            39: string(32) "614fcbba1effb7caa27ef0ef25c27fcf"
        !            40: int(2523)
        !            41: Done

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