Annotation of embedaddon/php/ext/oci8/tests/array_bind_010.phpt, revision 1.1
1.1 ! misho 1: --TEST--
! 2: oci_bind_array_by_name() and invalid values 8
! 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: $statement = oci_parse($c, 'SELECT user FROM all_objects');
! 11:
! 12: $array = Array(1,2,3,4,5);
! 13:
! 14: oci_bind_array_by_name($statement, ":c1", $array, 5, 5, SQLT_CHR);
! 15:
! 16: oci_execute($statement);
! 17:
! 18: var_dump($array);
! 19:
! 20: echo "Done\n";
! 21: ?>
! 22: --EXPECTF--
! 23: Warning: oci_bind_array_by_name(): ORA-01036: illegal variable name/number in %s on line %d
! 24: array(5) {
! 25: [0]=>
! 26: string(1) "1"
! 27: [1]=>
! 28: string(1) "2"
! 29: [2]=>
! 30: string(1) "3"
! 31: [3]=>
! 32: string(1) "4"
! 33: [4]=>
! 34: string(1) "5"
! 35: }
! 36: Done
FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>