CONNECTION to database

Stephen Woodbridge woodbri at SWOODBRIDGE.COM
Sun Mar 13 22:25:25 EST 2005


Paul Ramsey wrote:
> http://www.catb.org/~esr/faqs/smart-questions.html
>
> On 13-Mar-05, at 2:56 PM, w m wrote:
>
>> w m <wokar1 at YAHOO.COM> wrote:
>>  Hi,
>> I have a .shp file layer that i created from postgres.  then i
>> inserted that .shp in my mapscript and it is of type POINT. I want
>> user to be able to click on the points and retrieve information from
>> the data base(perhaps on another webpage which would display the
>> results of the query).  I tried using the CONNECTION command but
>> nothing happend.  any clue as to where i should start........

Wokar,

There is not automatic way to do what you are trying to do. Here are the
steps that you will need to work out:

1) display yourt data as a map using mapserver and a mapfile
2) implement a query using a JOIN of a column in the shapefile to your
database to get the information you want to display and set up some
templates to display it.
3) if you want it to display in another window there is a way to do
that, but I don't remember the details, but they are irrelavant if you
can't get the above working.
4) If you haven't checked out the demo you should, because I think it
has a good example of doing a query, that would help you understand that
part.

-Steve W.



More information about the mapserver-users mailing list