~ubuntu-branches/ubuntu/quantal/php5/quantal

« back to all changes in this revision

Viewing changes to ext/oci8/tests/coll_011_func.phpt

  • Committer: Bazaar Package Importer
  • Author(s): Sean Finney
  • Date: 2009-07-01 09:12:10 UTC
  • mto: (0.9.1) (1.1.17 upstream)
  • mto: This revision was merged to the branch mainline in revision 58.
  • Revision ID: james.westby@ubuntu.com-20090701091210-go0h6506p62on17r
Tags: upstream-5.3.0
ImportĀ upstreamĀ versionĀ 5.3.0

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
--TEST--
 
2
collections and strings
 
3
--SKIPIF--
 
4
<?php if (!extension_loaded('oci8')) die("skip no oci8 extension"); ?>
 
5
--FILE--
 
6
<?php
 
7
 
 
8
require dirname(__FILE__)."/connect.inc";
 
9
 
 
10
$ora_sql = "DROP TYPE
 
11
                                                ".$type_name."
 
12
                   ";
 
13
 
 
14
$statement = OCIParse($c,$ora_sql);
 
15
@OCIExecute($statement);
 
16
 
 
17
$ora_sql = "CREATE TYPE ".$type_name." AS TABLE OF VARCHAR(10)";
 
18
                          
 
19
$statement = OCIParse($c,$ora_sql);
 
20
OCIExecute($statement);
 
21
 
 
22
 
 
23
$coll1 = ocinewcollection($c, $type_name);
 
24
$coll2 = ocinewcollection($c, $type_name);
 
25
 
 
26
var_dump(oci_collection_append($coll1, "string"));
 
27
var_dump(oci_collection_append($coll1, "string"));
 
28
 
 
29
var_dump(oci_collection_assign($coll2, $coll1));
 
30
 
 
31
var_dump(oci_collection_element_get($coll2, 0));
 
32
 
 
33
echo "Done\n";
 
34
 
 
35
require dirname(__FILE__)."/drop_type.inc";
 
36
 
 
37
?>
 
38
--EXPECT--
 
39
bool(true)
 
40
bool(true)
 
41
bool(true)
 
42
string(6) "string"
 
43
Done