imp_res_get_none.phpt 1.2 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546
  1. --TEST--
  2. Oracle Database 12c Implicit Result Sets: oci_get_implicit_resultset: no implicit results
  3. --SKIPIF--
  4. <?php
  5. if (!extension_loaded('oci8')) die ("skip no oci8 extension");
  6. $target_dbs = array('oracledb' => true, 'timesten' => false); // test runs on these DBs
  7. require(dirname(__FILE__).'/skipif.inc');
  8. preg_match('/.*Release ([[:digit:]]+)\.([[:digit:]]+)\.([[:digit:]]+)\.([[:digit:]]+)\.([[:digit:]]+)*/', oci_server_version($c), $matches);
  9. if (!(isset($matches[0]) && $matches[1] >= 12)) {
  10. die("skip expected output only valid when using Oracle Database 12c or greater");
  11. }
  12. preg_match('/^[[:digit:]]+/', oci_client_version(), $matches);
  13. if (!(isset($matches[0]) && $matches[0] >= 12)) {
  14. die("skip works only with Oracle 12c or greater version of Oracle client libraries");
  15. }
  16. ?>
  17. --FILE--
  18. <?php
  19. require(dirname(__FILE__).'/connect.inc');
  20. // Run Test
  21. echo "Test 1\n";
  22. $s = oci_parse($c, "select * from dual");
  23. oci_execute($s);
  24. while (($s1 = oci_get_implicit_resultset($s))) {
  25. while (($row = oci_fetch_array($s1, OCI_ASSOC+OCI_RETURN_NULLS)) != false) {
  26. foreach ($row as $item) {
  27. echo " ".$item;
  28. }
  29. echo "\n";
  30. }
  31. }
  32. var_dump($s1);
  33. ?>
  34. ===DONE===
  35. <?php exit(0); ?>
  36. --EXPECTF--
  37. Test 1
  38. bool(false)
  39. ===DONE===