Following is sample code. oci_fetch_array returns resultset in array form.
Details are available on

$connection = oci_connect("apelsin", "kanistra");

$query = "SELECT id, name FROM fruits";

$statement = oci_parse ($connection, $query);
oci_execute ($statement);

while ($row = oci_fetch_array ($statement, OCI_BOTH)) {
   echo $row[0]." and ".$row['ID']." is the same<br>";
   echo $row[1]." and ".$row['NAME']." is the same<br>";

----- Original Message ----- From: "Hebat-Allah Farag" <[EMAIL PROTECTED]>
To: <>
Sent: Wednesday, February 20, 2008 2:01 PM
Subject: [PHP-DB] Retreving X, Y, Z from the Geometry column in oracle 10g

Dear all ,
I am stick since 2 days at the same point, I am using 10g, PHP my problem
now is how to fecth the X, Y , z coordinates from the geometry column to
view it on my web page, i don't understand the (SDO_ORDINATES), what is its
type & how i can deal with it. my simple code is:

I got an error on the last line as (ORA-00932: inconsistent datatypes:
expected CHAR got ARRAY )
i don't know how to deal with this resultset.

If anyone could help please replay.

Thanks for your help

PHP Database Mailing List (
To unsubscribe, visit:

Reply via email to