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(dirname(__FILE__).'/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===DONE===
35<?php exit(0); ?>
36--EXPECTF--
37Test - SQLT_AVC
38
39Warning: oci_bind_by_name(): Unknown or unsupported datatype given: 97 in %sbind_unsupported_1.php on line %d
40Test - SQLT_STR
41
42Warning: oci_bind_by_name(): Unknown or unsupported datatype given: 5 in %sbind_unsupported_1.php on line %d
43Test - SQLT_VCS
44
45Warning: oci_bind_by_name(): Unknown or unsupported datatype given: 9 in %sbind_unsupported_1.php on line %d
46Test - SQLT_LVC
47
48Warning: oci_bind_by_name(): Unknown or unsupported datatype given: 94 in %sbind_unsupported_1.php on line %d
49Test - SQLT_FLT
50
51Warning: oci_bind_by_name(): Unknown or unsupported datatype given: 4 in %sbind_unsupported_1.php on line %d
52Test - SQLT_UIN
53
54Warning: oci_bind_by_name(): Unknown or unsupported datatype given: 68 in %sbind_unsupported_1.php on line %d
55Test - SQLT_ODT
56
57Warning: oci_bind_by_name(): Unknown or unsupported datatype given: 156 in %sbind_unsupported_1.php on line %d
58===DONE===
59