Hy! I want to perform spatial queries using php and an oracle database. When I tried the code below I got the error massage that the SQL statement was not finished corrlectly. (Warning: oci_execute() [function.oci-execute]: ORA-00933: SQL-Befehl wurde nicht korrekt beendet on line 30). I have marked line 30 red. I could not solve this problem by myself therefore thanks for every hint!! regards steyr Here is the code: $da_date= $_REQUEST['da_date']; $da_id= $_REQUEST['da_id']; if ($c = @oci_connect("blabla","blabla","babla")) { // Parse a query to a resource statement. $s = oci_parse($c,"SELECT vl_id FROM vehicle_location MINUS SELECT a.vl_id FROM vehicle_location a, defined_area b WHERE SDO_ANYINTERACT(b.da_shape,a.vl_location) = 'TRUE' AND (b.da_date) = $da_date WHERE (b.da_id) = $da_id; "); // Execute query without an implicit commit. oci_execute($s,OCI_DEFAULT);
WHERE SDO_ANYINTERACT(b.da_shape,a.vl_location) = 'TRUE' AND (b.da_date) = $da_date WHERE (b.da_id) = $da_id; Two where clauses?