|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
[2001-10-19 14:57 UTC] alahaye at wanadoo dot fr
When i launch a sybase stored procedure with a compute inside, i can't get this resultset in my outpout array. PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
|
|||||||||||||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Wed Nov 05 13:00:01 2025 UTC |
Here an exemple : sybase_connect(SERVER,LOGIN,PASSWORD); sybase_select_db(DATABASE); $query = "EXEC MYPROC"; $result = sybase_query($query); while ($row = sybase_fetch_array($result)) { print $row["COLUMN1"]; print $row["COLUMN3"]; print $row["COLUMN3"]; } If in this sybase procedure there is not compute all is ok, all the record are return. But if there is a compute all the record are return and when php arrive in the compute line is don't display it. This bug is encountred when the proc return more than 1 recorset like (in the proc) SELECT LIB1, LIB2 FROM LIBELLE SELECT NAME, FNAME FROM PEOPLE In this exemple this proc is use to make a delivery order, in the same proc, whe make a select to retrive the customer information (name, adress, phone...) and the second select to retrive information about a command of this customer. Thanks for your help PS : The library is SYBASE_CT.User reported on php-dev, so adding here: --- Here a complete example (php and sybase) with the problem of compute sql statement. PHP stop when he encountred the compute. ? PHP : ? ??? sybase_query=("EXEC MYPROC"); ??? ??? $result = sybase_query($query); ?? ?while ($row = sybase_fetch_array($result)) ???? { ??????? print $row["COLUMN1"]; ??? ??? print $row["COLUMN3"]; ??? ??? print $row["COLUMN3"]; ?? ??} ? SYBASE PROC : ? SELECT DISTINCT doc1,";", conste+concen +conqtm+conord+coni1+coni2,";", numchg,"; ", rais1d,";", cpd,";", intcomd,";", dpliv,";", tcaht, ";", qtet,";", crgro, ";" FROM fantasio..f_mtf WHERE datchg>=@debut AND datchg<=@fin AND unit='6' ORDER BY dpliv, rais1d, intcomd, cpd COMPUTE SUM(tcaht), SUM(qtet) BY dpliv, rais1d, intcomd, cpd PHP stop on COMPUTE... Then it's a bug of PHP This error is encountred when i try to return two select.