queryByAttributes PostGIS Problem
Paul Moen
pmoen at STATE.ND.US
Mon Mar 27 09:51:13 PST 2006
The following gives me the ability I had in 4.6.2 with queryByAttributes.
It seems that 4.8.2 does not include a fix for bug 1629. I downloaded and applied the patch and
my query works as it did in 4.6.2.
The patch is available by going to http://mapserver.gis.umn.edu/bugs/index.cgi and entering
1629 for the bug number.
I downloaded the patch, named it mapostgis.patch and saved it in my mapserver-4.8.2 source
directory.
To apply the patch, in the mapserver-4.8.2 source directory, I typed in terminal,
patch mappostgis.c mappostgis.patch
I then recompiled mapserver and queryByAttributes works as it did in 4.6.2.
Hopefully someone will find this useful.
Paul Moen
On Thu, 23 Mar 2006 13:15:40 -0600, Paul Moen <pmoen at STATE.ND.US> wrote:
>Can anyone tell me how to use queryByAttributes in PHP mapscript to query a
>postgis layer with the following WHERE clause.
>
>WHERE (location LIKE '12458%' AND county = 'Bowman')
>
>I assume that I can do it with 4.8.2 since I could with mapscript 4.6.2
>using $search = $qlayer->queryByAttributes(county,"(location LIKE '12458%'
>AND county = 'Bowman')",MS_MULTIPLE);
>
>With 4.6.2, it didn't seem to matter what field I put in the first
>parameter, as long as it was a valid field. The second parameter was
>essentially the where clause.
>
>With 4.8.2, using $search = $qlayer->queryByAttributes(county,"(location
>LIKE '12458%' AND county = 'Bowman')",MS_MULTIPLE);
>creates the malformed where clause below.
>
>WHERE (county = 'location LIKE '12458%' AND county = 'Bowman'')
>
>Is this a bug or did the functionality go away?
>
>Thank you,
>
>Paul T. Moen
>pmoen at state.nd.us
>ND State Water Commission
More information about the MapServer-users
mailing list