error.phpt 866 B

12345678910111213141516171819202122232425262728293031323334353637383940414243
  1. --TEST--
  2. oci_error() error message for parsing error
  3. --SKIPIF--
  4. <?php
  5. $target_dbs = array('oracledb' => true, 'timesten' => false); // test runs on these DBs: different error messages from TimesTen
  6. require(dirname(__FILE__).'/skipif.inc');
  7. ?>
  8. --FILE--
  9. <?php
  10. require dirname(__FILE__)."/connect.inc";
  11. if (!empty($dbase)) {
  12. var_dump(oci_connect($user, $password, $dbase));
  13. }
  14. else {
  15. var_dump(oci_connect($user, $password));
  16. }
  17. var_dump($s = oci_parse($c, "WRONG SYNTAX"));
  18. var_dump(oci_execute($s));
  19. var_dump(oci_error($s));
  20. echo "Done\n";
  21. ?>
  22. --EXPECTF--
  23. resource(%s) of type (oci8 connection)
  24. resource(%s) of type (oci8 statement)
  25. Warning: oci_execute(): ORA-00900: %s in %s on line %d
  26. bool(false)
  27. array(4) {
  28. ["code"]=>
  29. int(900)
  30. ["message"]=>
  31. string(%d) "ORA-00900: %s"
  32. ["offset"]=>
  33. int(0)
  34. ["sqltext"]=>
  35. string(12) "WRONG SYNTAX"
  36. }
  37. Done