Help: Fetching SQL query result in PHP (Oracle Spatial)
Date: 6 Jun 2002 11:55:44 -0700
Message-ID: <b1027390.0206061055.30798fb_at_posting.google.com>
Hello!
I'm using Oracle Spatial Cardrige to creating a digital map. Interface is a web site, access to Oracle with PHP.
Creating a table:
CREATE TABLE cola_markets (
mkt_id NUMBER PRIMARY KEY,
name VARCHAR2(32),
shape MDSYS.SDO_GEOMETRY);
and insert some data:
INSERT INTO cola_markets VALUES(
1,
'cola_a',
MDSYS.SDO_GEOMETRY(
2003, NULL, NULL,
MDSYS.SDO_ELEM_INFO_ARRAY(1,1003,3), MDSYS.SDO_ORDINATE_ARRAY(1,1, 5,7)
)
Query: "SELECT shape FROM cola_markets" in SQLPlus returns a result like this:
SDO_GEOMETRY(2003, NULL, NULL, SDO_ELEM_INFO_ARRAY(1, 1003, 3), SDO_ORDINATE_ARRAY(1, 1, 5, 7)) I dont't know how to create a PHP function to fetch data from "shape" field. I need this ordinates to create a map.
I think, I need a PL/SQL procedure or function to format/convert the query result, so I can fetch the data I want.
Regards
Andrzej Stacherski
p.s. Sorry for my poor vocabulary :) Received on Thu Jun 06 2002 - 20:55:44 CEST