coll_014_func.phpt 819 B

1234567891011121314151617181920212223242526272829303132333435363738394041
  1. --TEST--
  2. collections and strings (2)
  3. --SKIPIF--
  4. <?php
  5. $target_dbs = array('oracledb' => true, 'timesten' => false); // test runs on these DBs
  6. require(dirname(__FILE__).'/skipif.inc');
  7. ?>
  8. --FILE--
  9. <?php
  10. require dirname(__FILE__)."/connect.inc";
  11. $ora_sql = "DROP TYPE
  12. ".$type_name."
  13. ";
  14. $statement = OCIParse($c,$ora_sql);
  15. @OCIExecute($statement);
  16. $ora_sql = "CREATE TYPE ".$type_name." AS TABLE OF VARCHAR(10)";
  17. $statement = OCIParse($c,$ora_sql);
  18. OCIExecute($statement);
  19. $coll1 = ocinewcollection($c, $type_name);
  20. var_dump(oci_collection_append($coll1, "striing"));
  21. var_dump(oci_collection_element_assign($coll1, 0,"blah"));
  22. var_dump(oci_collection_element_get($coll1, 0));
  23. echo "Done\n";
  24. require dirname(__FILE__)."/drop_type.inc";
  25. ?>
  26. --EXPECT--
  27. bool(true)
  28. bool(true)
  29. string(4) "blah"
  30. Done