[lug] php/oracle question (somewhat OT)

D. Stimits stimits at idcomm.com
Mon Jun 17 13:31:02 MDT 2002


Chip Atkinson wrote:
> 
> Posting the code is a good idea, I'll do that below.  I've used php/mysql
> before and really liked it, probably due to the ease of use. :-)
> The php code below using oracle have been giving me fits though.
> 
> TIA,
> 
> Chip
> 
> $conn = ora_logon("user", "password"); // Not the real values here of course
> 
> $query = "SELECT
>             acct acct, name, docdt, docnm, ROWID
>           FROM
>             onlstm_cont c
>           WHERE
>             acct=1111 and cu='abcd'
>           ORDER BY
>             name, acct,ssn, docdt, docnm";
> 
> /* This one seems to work if there is only one row.
>  * If more than one row, we get an oracle error, 1422,
>  * exact fetch returns more than requested number of rows.
>  */
> $query2 = "declare tmp char(40);
>            begin
>              select ufsnm into :tmp from onlstm_cont
>              where acct=1111 and cu='abcd';
>           end;";
...

Just a guess since I don't know anything about oracle, but does the
error change when you also quote the acct value, e.g., account='1111'?

D. Stimits, stimits at idcomm.com



More information about the LUG mailing list