SV: [PHP-DEV] I got "Resource id #1" but i don't want (Oracle 8, PHP4b3)

From: Date: Wed, 12 Jan 2000 07:59:23 +0000
Subject: SV: [PHP-DEV] 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-14516@lists.php.net to get a copy of this message
But if i remove "echo "Test: ".$resultat."\n";" i don't get any data from the database ??? This works, "$resultat = substr($resultat,14);", but i think it is not the right way :) /Mikael resultat is getting the return from $conn.ociresult. These now print "Resource id ####" instead of an int. Remove: echo "Test: ".$resultat."\n"; To make it go away. --Joey Smith > 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

« previous php.dev (#14516) next »