xref: /PHP-8.2/ext/oci8/tests/coll_013_func.phpt (revision b5a14e6c)
1--TEST--
2collections and correct dates (2)
3--EXTENSIONS--
4oci8
5--SKIPIF--
6<?php
7$target_dbs = array('oracledb' => true, 'timesten' => false);  // test runs on these DBs
8require(__DIR__.'/skipif.inc');
9?>
10--FILE--
11<?php
12
13require __DIR__."/connect.inc";
14
15$ora_sql = "DROP TYPE
16                        ".$type_name."
17           ";
18
19$statement = oci_parse($c,$ora_sql);
20@oci_execute($statement);
21
22$ora_sql = "CREATE TYPE ".$type_name." AS TABLE OF DATE";
23
24$statement = oci_parse($c,$ora_sql);
25oci_execute($statement);
26
27
28$coll1 = oci_new_collection($c, $type_name);
29
30var_dump(oci_collection_append($coll1, "28-JUL-05"));
31var_dump(oci_collection_element_assign($coll1, 0, "01-JAN-05"));
32var_dump(oci_collection_element_get($coll1, 0));
33
34echo "Done\n";
35
36require __DIR__."/drop_type.inc";
37
38?>
39--EXPECT--
40bool(true)
41bool(true)
42string(9) "01-JAN-05"
43Done
44