Hi list! I've recently dived into p.mapper, and the documentation has been really helpful. I was able to join a few tables in a PostGIS DB and display that in p.mapper. However, I get the following PHP ERROR when I try to query this layer:
[27-Jul-2009 11:57:16] PHP Fatal error: [MapServer Error]: msPOSTGISLayerGetShape(): Error executing POSTGIS SQL statement (in FETCH ALL): DECLARE mycursor2 BINARY CURSOR FOR SELECT "procedure_id"::text,"procedure_description_url"::text,"procedure_description_type"::text,"feature_of_interest_id"::text,"feature_of_interest_name"::text,"feature_of_interest_description"::text,"type"::text,"schema_link"::text,asbinary(force_collection(force_2d(geom)),'NDR') from (SELECT procedure.procedure_id AS procedure_id, procedure.description_url AS procedure_description_url, procedure.description_type AS procedure_description_type, feature_of_interest.feature_of_interest_id AS feature_of_interest_id, feature_of_interest.feature_of_interest_name AS feature_of_interest_name, feature_of_interest.feature_of_interest_description AS feature_of_interest_description, feature_of_interest.geom AS geom, feature_of_interest.feature_type AS type, feature_of_interest.schema_link AS schema_link FROM procedure in C:\Program Files\Apache Software Foundation\Apache2.2\htdocs\pmapper-4.0-beta2\incphp\query\squery.php on line 102 The relevant part of the mapfile looks as follows: LAYER #DEBUG 1 NAME MeteoSensors STATUS ON CONNECTIONTYPE postgis CONNECTION "user=***** password=********** dbname=SOSDB host=localhost port=5432" TYPE POINT DATA "geom FROM (SELECT procedure.procedure_id AS procedure_id, procedure.description_url AS procedure_description_url, procedure.description_type AS procedure_description_type, feature_of_interest.feature_of_interest_id AS feature_of_interest_id, feature_of_interest.feature_of_interest_name AS feature_of_interest_name, feature_of_interest.feature_of_interest_description AS feature_of_interest_description, feature_of_interest.geom AS geom, feature_of_interest.feature_type AS type, feature_of_interest.schema_link AS schema_link FROM procedure LEFT JOIN proc_foi ON procedure.procedure_id = proc_foi.procedure_id LEFT JOIN feature_of_interest ON proc_foi.feature_of_interest_id = feature_of_interest.feature_of_interest_id) AS procedure_location USING UNIQUE geom USING SRID=4326" TEMPLATE "void" METADATA "DESCRIPTION" "MeteoSensors" "RESULT_FIELDS" "procedure_id" "RESULT_HEADERS" "Procedure" "ows_title" "meteosensors" END # Metadata CLASS STYLE COLOR 255 0 0 SYMBOL "circle" SIZE 5 END #end style END #end class END #end layer END #end map Any thoughts on how this could be solved? Thank you in advance for your help! Sidney ------------------------------------------------------------------------------ _______________________________________________ pmapper-users mailing list pmapper-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/pmapper-users