Annotation of embedaddon/php/ext/oci8/tests/error_old.phpt, revision 1.1
1.1 ! misho 1: --TEST--
! 2: ocierror()
! 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:
! 11: require dirname(__FILE__)."/connect.inc";
! 12:
! 13: if (!empty($dbase)) {
! 14: var_dump(ocilogon($user, $password, $dbase));
! 15: }
! 16: else {
! 17: var_dump(ocilogon($user, $password));
! 18: }
! 19:
! 20: var_dump($s = ociparse($c, "WRONG SYNTAX"));
! 21: var_dump(ociexecute($s));
! 22: var_dump(ocierror($s));
! 23:
! 24: echo "Done\n";
! 25:
! 26: ?>
! 27: --EXPECTF--
! 28: resource(%s) of type (oci8 connection)
! 29: resource(%s) of type (oci8 statement)
! 30:
! 31: Warning: ociexecute(): ORA-00900: %s in %s on line %d
! 32: bool(false)
! 33: array(4) {
! 34: ["code"]=>
! 35: int(900)
! 36: ["message"]=>
! 37: string(%d) "ORA-00900: %s"
! 38: ["offset"]=>
! 39: int(0)
! 40: ["sqltext"]=>
! 41: string(12) "WRONG SYNTAX"
! 42: }
! 43: Done
FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>