Date: 11/30/99
- Next message: Rasmus Lerdorf: "RE: [PHP3] Writing to file - somebody other than nobody"
- Previous message: Boget, Chris: "RE: [PHP3] Writing to file - somebody other than nobody"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
>Can I call oracle stored procedures using the OCI with PHP.
Yes you can call stored procedures:
$stmt = OCIParse($connection,"BEGIN ProcedureName(parameters); END;");
OCIExecute($stmt);
OCIFreeStatement($stmt);
However if you execute a stored function you are interested in the return
value. Use:
$stmt = OCIParse($connection,"BEGIN :return_value :=
StoredFunctionName(parameters); END;");
OCIBindByName($stmt,":return_value",$retval,-1);
OCIExecute($stmt);
OCIFreeStatement($stmt);
Of course it is good not to just to put the parameters in the SQL string and
then parse it, but to bind them instead.
Florian
-- PHP 3 Mailing List <http://www.php.net/> To unsubscribe, send an empty message to php3-unsubscribe <email protected> To subscribe to the digest, e-mail: php3-digest-subscribe <email protected> To search the mailing list archive, go to: http://www.php.net/mailsearch.php3 To contact the list administrators, e-mail: php-list-admin <email protected>
- Next message: Rasmus Lerdorf: "RE: [PHP3] Writing to file - somebody other than nobody"
- Previous message: Boget, Chris: "RE: [PHP3] Writing to file - somebody other than nobody"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]

