[Geomoose-users] Search - blank values ignored (query.php)
CoFIS Web
coffee at uni-bonn.de
Mon Dec 28 10:38:13 EST 2009
Hope you all had a Merry Christmas and will have happy new Year 2010.
Meanwhile I tried my luck with elaborating the search function of my
app. When using
<input type="hidden" name="blanks0" value="true"/>
for ignoring blank inputs values for the first predicate GM returns:
Warning: [MapServer Error]: msQueryByRect(): No matching record(s)
found. in C:\ms4w\apps\cofis\2.0.1\htdocs\php\query.php on line 317
Warning: [MapServer Error]: msEvalExpression: Failed to parse
expression: OR (86341 > 9000) in
C:\ms4w\apps\cofis\2.0.1\htdocs\php\query.php on line 317
Warning: [MapServer Error]: msyyparse(): syntax error in
C:\ms4w\apps\cofis\2.0.1\htdocs\php\query.php on line 317
Warning: [MapServer Error]: msEvalExpression: Failed to parse
expression: OR (88937 > 9000) in
C:\ms4w\apps\cofis\2.0.1\htdocs\php\query.php on line 317
In the example above I left the first predicate (string) blank and
entered 9000 for the second.
If I input a string for the first predicate AND 9000 for the second the
search runs as expected and gives meaningful results.
Nils
The query service looks like:
<service name="search_wereda">
<url>php/query.php</url>
<step type="input">
<input type="hidden" name="highlight" value="true"/>
<input type="hidden" name="mode" value="search"/>
<input type="hidden" name="layer0" value="administration/all"/>
<input type="hidden" name="template0" value="itemquery"/>
<input type="hidden" name="blanks0" value="true"/>
<input type="select" name="fieldname0" title="Search for weredas">
<option value="wereda">by Name</option>
<option value="region">within Region</option>
</input>
<input type="select" name="comparitor0" title="that ">
<option value="like-icase">contains</option>
<option value="right-like-icase">begins with</option>
<option value="eq-str">matches exactly</option>
</input>
<input type="user" name="value0" title=""/>
<input type="hidden" name="fieldname1" value="poptot"/>
<input type="select" name="operator1">
<option value="or">or</option>
<option value="and">and</option>
</input>
<input type="select" name="comparitor1" title="where the TOTAL
POPULATION is ">
<option value="gt">greater than</option>
<option value="eq">equal to</option>
<option value="lt">less than</option>
</input>
<input type="user" name="value1" title=""/>
</step>
</service>
--
Center for Development Research
Department of Ecology and Resource Management
Walter-Flex-Strasse 3
53113 Bonn (Germany)
Tel.: +49 (0) 228 - 73-1793
FAX: +49 (0) 228 - 73-1889
E-Mail: coffee at uni-bonn.de
Web: http://www.cofis.info/atlas
http://www.coffee.uni-bonn.de
More information about the Geomoose-users
mailing list