Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6250751
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 24, 20262026-05-24T13:29:06+00:00 2026-05-24T13:29:06+00:00

I am having difficulty figuring out how to add data as input to an

  • 0

I am having difficulty figuring out how to add data as input to an Oracle cursor being sent to a stored procedure of a package in PHP.

I am trying to send 2 pieces of data through a cursor. I have verified the data is correct up to sending.

PHP Code:

$finalpieces = explode('|',$lkeyarr[$i]); //0=unique id, 1=table
$conn = oci_connect($oracleUsername,$oraclePassword,$oracleService);
$stmt = OCIParse($conn,"BEGIN PROD.PKG_CORE_OBSERVER.StuckPages_Unlock(:cur_PageDetails); END;");
$cur = oci_new_cursor($conn);
OCIBindByName($stmt,':cur_PageDetails',$cur,-1,OCI_B_CURSOR);
ociexecute($stmt,OCI_DEFAULT);

Stored Procedure Details:

PROCEDURE StuckPages_Unlock
    (
      cur_PageDetails IN OUT SYS_REFCURSOR
    )

accepts ref cursor that includes 2 fields:

 ProcessID          NUMBER(2);
 PageUniqueID       NUMBER(10);

Any help would be greatly appreciated.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-24T13:29:07+00:00Added an answer on May 24, 2026 at 1:29 pm

    A Ref Cursor is a pointer to a result set. We cannot assign values to a Ref Cursor, we use it with a query:

    open my_ref_cursor for
        select process_id, page_unique_id
        from some_table;
    

    So, your approach is wrong. It is difficult to be sure what you’re trying to achieve but I think what you want is a stored procedure which accepts two parameters that it uses to query a table and return a ref cursor. Perhaps, something like this:

    PROCEDURE StuckPages_Unlock
        (
          p_proc_id in some_table.process_id%type
          , p_page_id in some_table.page_unique_id_id%type
          , cur_PageDetails OUT SYS_REFCURSOR
        ) 
    IS
        open PageDetails for
            select *
            from some_table
            where process_id = p_proc_id
            and page_unique_id = p_page_id;
    END;
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm having a difficult time figuring out how to add a .jar/library to a
I'm having difficulty figuring out how to clone my Mercurial repository from my local
In the transition to newforms admin I'm having difficulty figuring out how specify core=False
I'm trying to learn the MapKit with Monotouch and I'm having difficulty figuring out
I'm having some difficulty figuring out the best ways to pause and resume my
I'm having some difficulty figuring out what is going on and how to fix
I'm having a bit of difficulty figuring out how to use this Regular Expression
I was having difficulty figuring out what does ^ and ! stand for in
I have an interesting content layout proposal but I'm having difficulty figuring out how
I am having some difficulty figuring out how to template the following TreeView item

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.