Question on queryByAttributes - multiple fields

Eduin Carrillo yecarrillo at YAHOO.COM
Mon Nov 29 16:48:19 PST 2004


 --- Cord Thomas <cord at LUPINEX.COM> escribió:
> Hello all
>
> Using MapServer 4.4x and Perl Mapscript on Linux against a PostGIS
> database, i am having difficulty with the queryByAttributes method on a
> polygon layer.
>
> I include my MAP snippet below, but basically, my code is this:
>
>   my $res = $mapLayer->queryByAttributes($map, $qryFlds,
>                                          $qryVals, $mapscript::MS_MULTIPLE);
>
> where $qryFlds = "stateid,name"
> and   $qryVals = "(stateid='ME' and name='Knox')"
>
> Is this the valid way to specify multiple fields - how can i get mapserver
> to dump the full query string to the log file?  i have a log file setup,
> and if i screw up the query string, it throws an error, but these criteria
> are right and mapserver reports this:
>
> - msQueryByAttributes(): Search returned no results. No matching record(s)
> found.
>
> thanks in advance
>
> .MAP snippet:
>
>     LAYER
>       NAME "counties"
>       STATUS OFF
>       TYPE POLYGON
>       DATA "wkb_geometry from county"
>       CONNECTION "user=tiger password=[somepassword] dbname=tiger
> host=localhost port=543
> 2"
>       CONNECTIONTYPE POSTGIS
>       PROJECTION
>          "proj=latlong"
>          "datum=NAD83"
>       END
>       UNITS DD
>
>       CLASS
>         COLOR 74 135 33
>         OUTLINECOLOR 28 55 11
>         TEMPLATE /var/www/cellsign/map/states_sm.html
>       END
>     END
>
>
>

It's really bad MS do not support native query in more than one field. This
behavior has not ever so. I developed at 2003 a like ArcView "Query Bulder"
based on Php and a complex javascript code using oMap->queryByAttribute()
function, but at version 3.7, MS no longer supports query multiple fields, so
my
querybuilder were lost.


=====
Eduin Yesid Carrillo Vega
yecarrillo at yahoo.com
COLOMBIA

_________________________________________________________
Do You Yahoo!?
Información de Estados Unidos y América Latina, en Yahoo! Noticias.
Visítanos en http://noticias.espanol.yahoo.com



More information about the MapServer-users mailing list