2005-09-06 19:33:18 +00:00
|
|
|
--TEST--
|
|
|
|
ocierror()
|
2005-12-06 19:26:57 +00:00
|
|
|
--SKIPIF--
|
2005-09-06 19:33:18 +00:00
|
|
|
<?php if (!extension_loaded('oci8')) die("skip no oci8 extension"); ?>
|
|
|
|
--FILE--
|
|
|
|
<?php
|
|
|
|
|
|
|
|
require dirname(__FILE__)."/connect.inc";
|
|
|
|
|
|
|
|
if (!empty($dbase)) {
|
|
|
|
var_dump(ocilogon($user, $password, $dbase));
|
|
|
|
}
|
|
|
|
else {
|
|
|
|
var_dump(ocilogon($user, $password));
|
|
|
|
}
|
|
|
|
|
|
|
|
var_dump($s = ociparse($c, "WRONG SYNTAX"));
|
|
|
|
var_dump(ociexecute($s));
|
|
|
|
var_dump(ocierror($s));
|
|
|
|
|
|
|
|
echo "Done\n";
|
|
|
|
|
|
|
|
?>
|
|
|
|
--EXPECTF--
|
|
|
|
resource(%s) of type (oci8 connection)
|
|
|
|
resource(%s) of type (oci8 statement)
|
|
|
|
|
|
|
|
Warning: ociexecute(): ORA-00900: invalid SQL statement in %s on line %d
|
|
|
|
bool(false)
|
|
|
|
array(4) {
|
|
|
|
["code"]=>
|
|
|
|
int(900)
|
|
|
|
["message"]=>
|
|
|
|
string(32) "ORA-00900: invalid SQL statement"
|
|
|
|
["offset"]=>
|
|
|
|
int(0)
|
|
|
|
["sqltext"]=>
|
|
|
|
string(12) "WRONG SYNTAX"
|
|
|
|
}
|
|
|
|
Done
|
2006-07-10 20:48:04 +00:00
|
|
|
--UEXPECTF--
|
|
|
|
resource(%d) of type (oci8 connection)
|
|
|
|
resource(%d) of type (oci8 statement)
|
|
|
|
|
|
|
|
Warning: ociexecute(): ORA-00900: invalid SQL statement in %s on line %d
|
|
|
|
bool(false)
|
|
|
|
array(4) {
|
2006-12-23 14:10:52 +00:00
|
|
|
[u"code"]=>
|
2006-07-10 20:48:04 +00:00
|
|
|
int(900)
|
2006-12-23 14:10:52 +00:00
|
|
|
[u"message"]=>
|
2006-11-10 16:56:19 +00:00
|
|
|
unicode(32) "ORA-00900: invalid SQL statement"
|
2006-12-23 14:10:52 +00:00
|
|
|
[u"offset"]=>
|
2006-07-10 20:48:04 +00:00
|
|
|
int(0)
|
2006-12-23 14:10:52 +00:00
|
|
|
[u"sqltext"]=>
|
2006-11-10 16:56:19 +00:00
|
|
|
unicode(12) "WRONG SYNTAX"
|
2006-07-10 20:48:04 +00:00
|
|
|
}
|
|
|
|
Done
|