The itemnquery does not work

Fawcett, David David.Fawcett at STATE.MN.US
Thu Sep 29 09:23:54 EDT 2005


Holmand, 

It looks like you were using the old syntax for queries, with filter.  Randy is right, you need to use qlayer, qitem and qstring.  

Looking at your form variables, try:  

<input type="hidden" name="qlayer" value="Ciudades">
<input type="hidden" name="qitem" value="nombre">
<input type="text" name="qstring" size="30">   
<input type="radio" name="mode" value="itemnquery">
<input type="submit" value="Consultar">


You should remove FILTER and FILTERITEM from your layer definition.

David.


-----Original Message-----
From: UMN MapServer Users List [mailto:MAPSERVER-USERS at LISTS.UMN.EDU] On Behalf Of Randy James
Sent: Wednesday, September 28, 2005 3:59 PM
To: MAPSERVER-USERS at LISTS.UMN.EDU
Subject: Re: [UMN_MAPSERVER-USERS] The itemnquery does not work


Been a while since i set up a query but it looks like you are missing the qitem, and qstring

<input type="hidden" name="savequery" value="true">
<input type="hidden" name="qitem" value="column in database">

<input type="TEXT" size="30" name="qstring" value=""> collects string to pass to query

--- Holmand Darío Villalba Barajas <holmand24 at GMAIL.COM> wrote:

> I am doing a consultation for attributes with the itemnquery, but the 
> following mistake goes out for me:
> 
> msQueryByAttributes(): Query error. No query expression defined.
> 
> This is what I do:
> 
> <input type="hidden" name="item" value="CIUDAD">
> <input type="hidden" name="atributo" value="nombre">
> <input type="hidden" name="qlayer" value="Ciudades">
> <input type="text" name="nombre" size="10">
> <input type="submit" value="Consultar">
> <input type="radio" name="mode" value="itemnquery">
> 
>  LAYER
>     # name of layer
>     NAME "Ciudades"
>     GROUP "MAPAS_VECTORIALES"
>     # always returned with interface
>     STATUS ON
>     # actual data pointer
>     DATA "data/ciudades"
>     # what type of data is this?
>     TYPE POINT
> 	FILTERITEM "CIUDAD"
> 	FILTER "%nombre%"
>     TOLERANCE 5
>     #LABELITEM "CIUDAD"
>     # data is queryable
>     # query templates for HTML-based queries
>     HEADER "templates/ciudades_query_header.html"
>     TEMPLATE "templates/ciudades_query_body.html"
>     # how will this data look?
> 
> someone can say to me that it(he,she) is bad.
> I use mapserver 4.x
> 
> Thank you.
> 



		
__________________________________ 
Yahoo! Mail - PC Magazine Editors' Choice 2005 
http://mail.yahoo.com



More information about the mapserver-users mailing list