Oracle Stored Procedures using PHP/ODBC

wxdqz

New Member
Greetings,

I am in need of your help. I am running PHP 4.0.6, and Oracle 8.1.7 on a Linux RedHat 7.1 system using Apache as a web server. I am using unixODBC with easySoft's Oracle driver.


I am able to select from my Oracle Tables using the following code with no trouble at all:

<?php

$dbHandle = odbc_connect( 'dsn' , 'user', 'passwd' );
$resultSet = odbc_exec( $dbHandle, "SELECT ID from USER_LOGIN");
while(odbc_fetch_row($resultSet)){
$ID = odbc_result($resultSet, 1);
echo $ID;
}
odbc_close( $dbHandle );

?>

Now I need to call a stored procedure using the easysoft Oracle driver as well. Anybody have any ideas? This is what I tried so far:

<?php

$dbHandle = odbc_connect( 'dsn' , 'user', 'passwd' );
$resultSet = odbc_exec($dbHandle, "BEGIN database_pkg.modifyUser(0,'username','passwd');
$retValue = odbc_result($resultSet, 1);
odbc_close( $dbHandle );

?>

Any help would be greatly appreciated!!
 
Back
Top