[PHP] Biding Arrays from Oracle Stored Procedure to PHP Variables

2003-05-29 Thread Gregory Watson
Hi guys...

I'm very new to using Oracle and stored procedures.

I'm using a stored procedure to return 12 variables, 8 of which are arrays.



   $EventID = 41403;
   $BufferSize = 3000;
   $connection_oracle = OCILogon("","**", "**");
   $statement_oracle = OCIParse($connection_oracle, "BEGIN
   CFADMIN.getRewardUserList(:in_eventid, :out_status,
   :out_record_count, :in_buffersize, :out_memberid, :out_firstname,
   :out_lastname, :out_city, :out_state, :out_loginid, :out_email,
   :out_redeemstatus); END;");
   OCIBindByName($statement_oracle, ":in_eventid", $EventID, -1);
   OCIBindByName($statement_oracle, ":out_status", $Status, -1);
   OCIBindByName($statement_oracle, ":out_record_count", $RecordCount, -1);
   OCIBindByName($statement_oracle, ":in_buffersize", $BufferSize, -1);
   OCIBindByName($statement_oracle, ":out_memberid", $MemberID, -1,
   OCI_ASSOC);
   OCIBindByName($statement_oracle, ":out_firstname", $FirstName, -1,
   OCI_ASSOC);
   OCIBindByName($statement_oracle, ":out_lastname", $LastName, -1,
   OCI_ASSOC);
   OCIBindByName($statement_oracle, ":out_city", $City, -1, OCI_ASSOC);
   OCIBindByName($statement_oracle, ":out_state", $State, -1, OCI_ASSOC);
   OCIBindByName($statement_oracle, ":out_loginid", $LoginID, -1,
   OCI_ASSOC);
   OCIBindByName($statement_oracle, ":out_email", $Email, -1, OCI_ASSOC);
   OCIBindByName($statement_oracle, ":out_redeemstatus", $RedeemStatus,
   -1, OCI_ASSOC);
   OCIExecute($statement_oracle, OCI_DEFAULT);
   OCIFreeStatement($statement_oracle);
   OCILogOff($connection_oracle);
?>

I keep getting the following error:

   Warning: OCIStmtExecute: ORA-06550: line 1, column 7: PLS-00306:
   wrong number or types of arguments in call to 'GETREWARDUSERLIST'
   ORA-06550: line 1, column 7: PL/SQL: Statement ignored in
   C:\ftp_dir\boards\winners.php on line 22
I know I'm not binding them correctly, but I've looked all over the PHP 
site and I can't seem to find anything that makes any sense in what to 
do! Can anyone help?

Thanks in advance!

Greg



--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


Re: [PHP] Re: Biding Arrays from Oracle Stored Procedure to PHP Variables

2003-05-30 Thread Gregory Watson
Thanks Lang - from the notes you sent me I'm able to bind arrays 
successfully using a complex select, but using the procedure still gives 
me an error:

   Warning: OCIStmtExecute: ORA-01008: not all variables bound in
   C:\ftp_dir\boards\winners.php on line 20
   Warning: OCIFetch: ORA-24374: define not done before fetch or
   execute and fetch in C:\ftp_dir\boards\winners.php on line 21
All the variables are there; is there any way to get more detail on 
which variable or variables is causing problems?

Thanks again

Greg

Lang Sharpe wrote:

Have a look at this paper, in particular the collections section at the end

http://www.phpconference.de/2001/slides/arntzen_ocipaper.txt

I've never used them myself, because they look a bit dodgy. But it may be 
the only way to do what you're trying to do.

Lang
 



Re: [PHP] Alguine me puede Ayudar...S.O.S...mi PHP no sube .....!!!!

2002-06-04 Thread Gregory Watson

Ok, here's that email in English, if anyone can help this guy... I can't
unfortunately.

"Hello It is that I have problems so that works PHP in a servant NT 4,0
with IIS 3,0 and this PHP does not work to see. 4.2.1) since when doing
some of the examples that no encloses (codigos) works. Hicela proves
with Apache/Win98/PHP and there I work myself. Nonentinedo that is what
happens; ademas segui instruciones of the pagina Web
http://www.php.net/manual/fi/configuration.php and asi I do not even
work. If somebody can Help me would thank for it, since this has to me
very complicated. Greetings. Oscar Dwells PS: With these codigos, I make
test with a called pagina prueba.php and I realized of which in NT it
did not work, but if in W98 (with php 4.2.0). "

[EMAIL PROTECTED] wrote:

> Hola
>  Resulta que tengo problemas para que funcione PHP en un
> servidor NT 4.0 con IIS 3.0 y este no funciona PHP ver. 4.2.1) ya que
> al
> hacer alguno de ...
>
>  //es mi primer script en PHP \n";
> echo $myvar; ?>
> 
> Forma 1
> 
> 
> Forma 2
> 
> 
> Forma 3
>  echo "Hola, este es un mensaje de
> Prueba
> con PHP"; 
> 
> Forma4
> <% echo "Hola, este es un mensaje de Prueba con PHP"; %>
> 
>