Welcome Guest, Not a member yet? Register   Sign In
Using CI with Oracle Stored Procedures
#1

[eluser]Ayo[/eluser]
I have been trying to get CI+Oracle Stored Procedures working.

The issue i currently have is the corruption of input data during oci binding:

Below is a snippet from:
MODEL

Code:
function testProc($dat)
{
        $params = array(
                        array('name'=>':p_num', 'value'=>$dat, 'type'=>SQLT_NUM, 'length'=>-1),
                        array('name'=>':p_out', 'value'=>&$res2, 'type'=>OCI_B_INT, 'length'=>-1)
                        );
                              
        $this->db->stored_procedure('SPSB_PKG','TEST',$params);
}

ORACLE STORED PROCEDURE
Code:
PROCEDURE test(p_num NUMBER,
                 p_out OUT NUMBER)
  AS
  BEGIN
    p_out := p_num;
  END test;


When i call this function from the Controller passing in a value(eg. 4), when i check the returned value in variable $res2 i get varying values like 220189512,220189160,-0.008212.

Any help with how to bind oracle datatypes to php will be appreciated.

Thanks.


Messages In This Thread
Using CI with Oracle Stored Procedures - by El Forum - 07-22-2009, 08:05 AM
Using CI with Oracle Stored Procedures - by El Forum - 07-22-2009, 09:54 PM
Using CI with Oracle Stored Procedures - by El Forum - 08-04-2009, 01:02 PM
Using CI with Oracle Stored Procedures - by El Forum - 08-04-2009, 05:01 PM
Using CI with Oracle Stored Procedures - by El Forum - 10-28-2009, 07:24 AM
Using CI with Oracle Stored Procedures - by El Forum - 09-10-2010, 07:26 PM
Using CI with Oracle Stored Procedures - by El Forum - 09-11-2010, 01:10 AM
Using CI with Oracle Stored Procedures - by El Forum - 05-25-2011, 08:56 AM



Theme © iAndrew 2016 - Forum software by © MyBB