I got "Resource id #1" but i don't want (Oracle 8, PHP4b3)
| From: | Mikael dot Fransson at electronics dot combitech dot se | Date: | Tue, 11 Jan 2000 16:22:43 +0000 |
| Subject: | I got "Resource id #1" but i don't want (Oracle 8, PHP4b3) | ||
| Groups: | php.dev | ||
| Request: | Send a blank email to php-dev+get-14505@lists.php.net to get a copy of this message | ||
I don't now if this is the right place to ask for some help but i have a
problem what i don't can find any information about why it happens anywhere
on Internet. I use PHP4 beta 3 on a Redhat 6.1 server to connect to a Oracle
8 database. It works and i got all data i want but i also got the text
"Resource id #1" on every answer, why? I don't want this text before every
result.
Result:
"Orderstock: Test: Resource id #174887948.46 slut "
Sample code:
<%
ociinternalDebug(off);
$prod_koppling = ocilogon("","","");
function select_data_orderstock($conn)
{
$stmt = ociparse($conn,
"select SUM((B.BUY_QTY_DUE - B.QTY_SHIPPED)* nvl(B.BASE_SALE_UNIT_PRICE, 0)
* ((100 - nvl(B.DISCOUNT, 0)) / 100) *
((100 - nvl(B.ORDER_DISCOUNT, 0)) / 100)) as ORDERSTOCK
from IFSCE.CUSTOMER_ORDER_LINE B
WHERE B.OBJSTATE not like 'Invoiced'
AND (upper( CUSTOMER_ORDER_API.Get_Currency_Code(B.ORDER_NO) ) = upper(
'SEK' ) ) GROUP BY 1");
OCIExecute($stmt);
OCIFetch($stmt);
$resultat= $conn.ociresult($stmt,"ORDERSTOCK");
echo "Test: ".$resultat."\n";
OCIFreeStatement($stmt);
#OCILogoff($prod_koppling);
}
%>
Orderstock: <%select_data_orderstock($prod_koppling);%>slut
Regards Mikael