????JFIF??x?x????'
Server IP : 79.136.114.73 / Your IP : 18.188.39.45 Web Server : Apache/2.4.7 (Ubuntu) PHP/5.5.9-1ubuntu4.29 OpenSSL/1.0.1f System : Linux b8009 3.13.0-170-generic #220-Ubuntu SMP Thu May 9 12:40:49 UTC 2019 x86_64 User : www-data ( 33) PHP Version : 5.5.9-1ubuntu4.29 Disable Function : pcntl_alarm,pcntl_fork,pcntl_waitpid,pcntl_wait,pcntl_wifexited,pcntl_wifstopped,pcntl_wifsignaled,pcntl_wexitstatus,pcntl_wtermsig,pcntl_wstopsig,pcntl_signal,pcntl_signal_dispatch,pcntl_get_last_error,pcntl_strerror,pcntl_sigprocmask,pcntl_sigwaitinfo,pcntl_sigtimedwait,pcntl_exec,pcntl_getpriority,pcntl_setpriority, MySQL : ON | cURL : ON | WGET : ON | Perl : ON | Python : ON | Sudo : ON | Pkexec : ON Directory : /proc/self/root/home/b8009/php-5.6.22/ext/oci8/tests/ |
Upload File : |
--TEST-- Test some oci_bind_by_name error conditions --SKIPIF-- <?php if (!extension_loaded('oci8')) die("skip no oci8 extension"); ?> --FILE-- <?php require(dirname(__FILE__).'/connect.inc'); $drop = "drop table bind_test"; $statement = oci_parse($c, $drop); @oci_execute($statement); $create = "create table bind_test(name varchar(10))"; $statement = oci_parse($c, $create); oci_execute($statement); echo "Insert value\n"; $name = 'abc'; $stmt = oci_parse($c, "insert into bind_test values (:name)"); oci_bind_by_name($stmt, ":name", $name, 10, SQLT_CHR); var_dump(oci_execute($stmt)); echo "Test 1 - Assign a resource to the bind variable and execute \n"; $name=$c; var_dump(oci_execute($stmt)); echo "Test 2 - Re-bind a resource\n"; oci_bind_by_name($stmt, ":name", $c); var_dump(oci_execute($stmt)); var_dump($c); // Use a connection resource instead of a ROWID. echo "Test 3 - Resource mismatch !!\n"; $stmt = oci_parse($c, "update bind_test set name='xyz' returning rowid into :r_id"); oci_bind_by_name($stmt, ":r_id", $c); var_dump(oci_execute($stmt)); // Clean up $drop = "drop table bind_test"; $statement = oci_parse($c, $drop); @oci_execute($statement); echo "Done\n"; ?> --EXPECTF-- Insert value bool(true) Test 1 - Assign a resource to the bind variable and execute Warning: oci_execute(): Invalid variable used for bind in %s on line %d bool(false) Test 2 - Re-bind a resource Warning: oci_bind_by_name(): Invalid variable used for bind in %s on line %d Warning: oci_execute(): Invalid variable used for bind in %s on line %d bool(false) resource(%d) of type (oci8 connection) Test 3 - Resource mismatch !! Warning: oci_bind_by_name(): Invalid variable used for bind in %s on line %d Warning: oci_execute(): ORA-%r(01008|57000)%r: %s on line %d bool(false) Done