Marco,
Look in pmapper-3.2.beta4\config\dev\search.xml fro some nice samples.
Teh second field is a suggest. Mind the sql statement and the depend
field.
<searchitem name="cities_options_suggest_pg" description="Communes
Suggest PG">
<layer type="postgis" name="cmeu01">
<field type="s" name="cmcncd" description="Country"
wildcard="2">
<definition type="options"
connectiontype="db" sort="asc">
<dsn
encoding="UTF-8">pgsql://postgres:[EMAIL PROTECTED]/gisdb</dsn>
<sql>SELECT DISTINCT cnty_id, name_en FROM countries
WHERE name_en IS NOT NULL ORDER BY name_en</sql>
<events>onchange="resetSuggestCache();$('#pmsfld_CITY_NAME').val('')"</e
vents>
</definition>
</field>
<field type="s" name="cmsbname" description="Name"
wildcard="2">
<definition type="suggest"
connectiontype="db" sort="asc" minlength="3" dependfld="cmcncd">
<dsn
encoding="UTF-8">pgsql://postgres:[EMAIL PROTECTED]/gisdb</dsn>
<sql>SELECT DISTINCT cmsbname
FROM cmeu01 WHERE cmsbname ~* '^[search]' {and cmcncd =
'[dependfldval]'} ORDER BY cmsbname</sql>
</definition>
</field>
</layer>
</searchitem>
Andre van Atten
-----Oorspronkelijk bericht-----
Van: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] Namens
[EMAIL PROTECTED]
Verzonden: woensdag 16 januari 2008 15:13
Aan: [email protected]
Onderwerp: [pmapper-users] search.xml
Hi, i have installed MDB2 on PEAR so i haven't any more the
error: ""Warning: Suggest::require_once(DB.php)
> [function.Suggest-require-once]: failed to open stream: No such file
> or directory in
>
C:\ms4w\apps\pmapper\pmapper-3.2.beta4\incphp\query\suggest.php
> on line 126"
but the search doesn't work; i'm working with
pmapper3.2beta4 and i'm using postgis, i'm trying to make a search
"type=suggest/option", so in search.xml i wrote:
"<searchitem name="civici_pg" description="civici pg">
<layer type="postgis" name="civici">
<field type="s" name="descvia" description="via"
wildcard="2">
<definition type="suggest" connectiontype="db"
sort="asc" minlength="2" dependfld="descvia">
<dsn
encoding="UTF-8">pgsql://postgres:[EMAIL PROTECTED]/acam</dsn>
</definition>
</field>
</layer>
</searchitem>"
where:
user= postgres
host= localhost
db= acam
When I make the search it doesn't work and in the log
file(\ms4w\Apache\logs) there is not any information.
Anybody could help me??
thanks all!!
marco
------------------------------------------------------------------------
-
This SF.net email is sponsored by: Microsoft Defy all challenges.
Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
pmapper-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/pmapper-users
-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
pmapper-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/pmapper-users