[Mapserver-users] Problem with setFilter

Attila Csipa bear at prometheus.org.yu
Thu Jul 3 03:53:47 EDT 2003


On Thursday 03 July 2003 00:25, Andrea Albano wrote:
> $oLayer->setFilter($szFiltExp1);
> But this NEVER WORKS!!! The layer will be empty!!!
> And almost incredible... if I explicitly set the exactly same string via
> code.. WORKS!!!
> $szFiltExp2 = "('[STATE]'='ITALY')";
> $oLayer->setFilter($szFiltExp2);
> I've tried almost everything:
> string function like eval, var_export, stripslashes,...
> other syntax: like $oLayer->setFilter("\"$szFiltExp1\"");
> single quote string like '(\'[STATE]\'=\'ITALY\')';
> but nothing, nothing, nothing...
> Where is the problem: PHP or mapscript setFilter?
> And how really treat his parameter the setFilter function?

This might be a manifestation of bug #242

http://mapserver.gis.umn.edu/bugs/show_bug.cgi?id=242





More information about the mapserver-users mailing list