Opened 19 years ago
Closed 19 years ago
#1629 closed defect (fixed)
queryByAttributes creates wrong WHERE clause on PostGIS layers
Reported by: | Owned by: | refractions | |
---|---|---|---|
Priority: | high | Milestone: | |
Component: | PostGIS Interface | Version: | 4.8 |
Severity: | critical | Keywords: | |
Cc: |
Description
Using Mapserver 4.8.0-beta2 Windows (from maptools.org) the following call $msLayer->queryByAttributes('myAttribute', 'myAttribute in ('A', 'B')', MS_MULTIPLE) results in the following WHERE-clause send to Postgres .. WHERE (myAttribute = 'myAttribute in ('A', 'B')') and ... which oviously results in an error. Version 4.6.1 on the other hand creates the correct clause: ... WHERE (myAttribute in ('A', 'B')) and ... Is this issue probably solved in the newer 4.8-RC versions?
Attachments (1)
Change History (7)
comment:1 by , 19 years ago
Cc: | added |
---|---|
Component: | MapScript-PHP → PostGIS Interface |
Owner: | changed from | to
comment:2 by , 19 years ago
Try to remove FILTERITEM and use FILTER parameter only, written as follows: myAttribute in ('A', 'B') Then postgis will generate the correct query. This 'enhancement' was in fact added after 4.6.1. As the docs say FILTERITEM is for 'OGR and shapefiles only'.
comment:3 by , 19 years ago
I do not have any FILTER or FILTERITEM. The problem occurs with the queryByAttributes function in PHP MapScript (maybe I was not completely clear in this point).
comment:4 by , 19 years ago
Status: | new → assigned |
---|
I have committed a patch for this in CVS HEAD. I attach the same patch here if someone can confirm it then we will include it in 4.8 and close this issue.
comment:6 by , 19 years ago
Resolution: | → fixed |
---|---|
Status: | assigned → closed |
Marking as fixed for now, the patch should be in 4.8.2.
Note:
See TracTickets
for help on using tickets.