|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2001-02-18 06:32 UTC] thies@php.net
|
|||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Mon Oct 27 05:00:01 2025 UTC |
The html produced by the code below : Result : TAB1,12:11:47 Warning: OCIFetchInto: ORA-01001: invalid cursor in C:\www\php\test.php3 on line 11 ----- I got this error only when i call ocilogon with the same db param (same net8 alias). No error when : - the db param is different (different net8 alias), - same oracle database but different net8 alias name. So, replace "db" by "db2" in the second call to ocilogon and declare a new net8 alias named db2 to the same oracle database and you got no error. ----- <? $res = array(); //OCIInternalDebug(1); $local = ocilogon("user1", "pass1", "db"); $remote = ocilogon("user2","pass2", "db"); if($local && $remote) { $select1 = "select table_name from user_tables"; $select2 = "select to_char(sysdate, 'HH24:MI:SS') from dual"; $rcur = ociparse($remote, $select1); ociexecute($rcur, OCI_DEFAULT); while(ocifetchinto($rcur, &$res, OCI_ASSOC+OCI_NUM+OCI_RETURN_NULLS)) { echo "Result : " .$res[0] . ","; $lcur = ociparse($local, $select2); if($lcur) { ociexecute($lcur, OCI_DEFAULT); ocifetchinto($lcur, &$res2); ocifreecursor($lcur); echo $res2[0]; } echo "<BR>\n"; } ocifreecursor($rcur); ocilogoff($local); ocilogoff($remote); }