Query in Mapserver

Pericles S. Nacionales pnaciona at gis.umn.edu
Tue Mar 21 21:50:28 EST 2000


The problem is you have the wrong syntax for JOIN.  JOIN is now used in the
same way as other objects in a map file.  That is you begin with the keyword
JOIN and end with END.  Here's how it should look, based on the example you
gave:

QUERYITEM usclass
QUERY
    EXPRESSION "421"
    TEMPLATE lakes.html
    JOIN   # start of JOIN object
        NAME water
        TABLE "lakejoin.dbf"
        FROM "islake"
        TO "type"
        TYPE single
    END   # end of JOIN object
END
QUERY
    EXPRESSION "^-"
    TEMPLATE land.html
    JOIN   # start of JOIN object
        NAME notwater
        TABLE "lakejoin.dbf"
        FROM "islake"
        TO "type"
    END   # end of JOIN object
 END
END # layer

Have a look at the map file docs (http://mapserver.gis.umn.edu/mapfile.html)
for other mapserver objects/keywords.

Perry N.

----- Original Message -----
From: "Peter Le" <ple at desolagroup.com>
To: <mapserver-users at lists>
Sent: Tuesday, March 21, 2000 5:23 PM
Subject: Query in Mapserver


> Hello,
>
> For 2 days I've been trying to run the demo query as follows:
>
> QUERYITEM usclass
>   QUERY
>     EXPRESSION "421"
>     TEMPLATE lakes.html
>     JOIN "data/lakejoin.dbf" islake "type"
>   END
>   QUERY
>   EXPRESSION "^-"
>     TEMPLATE land.html
>     JOIN "data/lakejoin.dbf" islake "type"
>   END
> END # Layer
>
> For some reasons, I always run into this error:
> loadJoin(): Unknown identifier. (data/lakejoin.dbf):(119)
>
> Could you help me in understanding the syntax for Mapserver query?  I
really
> appreciate your help.
>
> Peter Le
>




More information about the mapserver-users mailing list