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