Opened 17 years ago

Closed 17 years ago

#1964 closed defect (fixed)

queryByAttributes method fails when using simple quotes on postGIS data

Reported by: pierre.giraud@… Owned by: mapserver-bugs@…
Priority: high Milestone:
Component: PostGIS Interface Version: 4.10
Severity: normal Keywords:
Cc: sylvain.pasche@…, yjacolin@…

Description

When using simple quotes in qstring parameter, the SQL query in postGIS is
truncated.

Something like the following in mapscript :
$map->getLayer(0)->queryByAttributes('id', "id in '126'", MS_MULTIPLE);

generates the following statement in postGIS :
DECLARE mycursor [...] SELECT [...] WHERE (id in ) and (the_geom [...]

Note : If needed, a test case (data + mapscript code) can be provided.

Change History (3)

comment:1 by sylvain.pasche@…, 17 years ago

Cc: sylvain.pasche@… added

comment:2 by yjacolin@…, 17 years ago

Cc: yjacolin@… added

comment:3 by sdlime, 17 years ago

Resolution: fixed
Status: newclosed
I believe this has already been fixed, but isn't in a public release yet. You 
can work from CVS to be sure. Marking as fixed until I hear otherwise.

Steve
Note: See TracTickets for help on using tickets.