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