1--TEST--
2Bind with various unsupported bind types
3--SKIPIF--
4<?php if (!extension_loaded('oci8')) die("skip no oci8 extension"); ?>
5--FILE--
6<?php
7
8require(__DIR__.'/connect.inc');
9
10// These types are defined in oci8.c
11
12$types = array(
13    "SQLT_AVC" => SQLT_AVC,
14    "SQLT_STR" => SQLT_STR,
15    "SQLT_VCS" => SQLT_VCS,
16    "SQLT_AVC" => SQLT_AVC,
17    "SQLT_STR" => SQLT_STR,
18    "SQLT_LVC" => SQLT_LVC,
19    "SQLT_FLT" => SQLT_FLT,
20    "SQLT_UIN" => SQLT_UIN,
21    "SQLT_ODT" => SQLT_ODT,
22);
23
24foreach ($types as $t => $v) {
25
26    echo "Test - $t\n";
27
28    $s = oci_parse($c, "select * from dual where dummy = :c1");
29    $c1 = "Doug";
30    oci_bind_by_name($s, ":c1", $c1, -1, $v);
31}
32
33?>
34--EXPECTF--
35Test - SQLT_AVC
36
37Warning: oci_bind_by_name(): Unknown or unsupported datatype given: 97 in %sbind_unsupported_1.php on line %d
38Test - SQLT_STR
39
40Warning: oci_bind_by_name(): Unknown or unsupported datatype given: 5 in %sbind_unsupported_1.php on line %d
41Test - SQLT_VCS
42
43Warning: oci_bind_by_name(): Unknown or unsupported datatype given: 9 in %sbind_unsupported_1.php on line %d
44Test - SQLT_LVC
45
46Warning: oci_bind_by_name(): Unknown or unsupported datatype given: 94 in %sbind_unsupported_1.php on line %d
47Test - SQLT_FLT
48
49Warning: oci_bind_by_name(): Unknown or unsupported datatype given: 4 in %sbind_unsupported_1.php on line %d
50Test - SQLT_UIN
51
52Warning: oci_bind_by_name(): Unknown or unsupported datatype given: 68 in %sbind_unsupported_1.php on line %d
53Test - SQLT_ODT
54
55Warning: oci_bind_by_name(): Unknown or unsupported datatype given: 156 in %sbind_unsupported_1.php on line %d
56