That's it, I thought the SQL tag wasn't required as I didn't need to filter
the postgis data.
Now it works:
<searchitem name="tree" description="Tree">
<layer type="postgis" name="tree">
<field type="n" name="id_tree" description="Tree" wildcard="2">
<definition type="suggest" connectiontype="db" minlength="1"
startleft="1" sort="asc">
<dsn encoding="UTF-8">pgsql://user:pass@localhost
/db_name</dsn>
<sql>SELECT DISTINCT id_tree FROM tree ORDER BY
id_tree</sql>
</definition>
</field>
</layer>
</searchitem>
Thanx a lot Armin!
About modifying the wiki
page<http://svn.pmapper.net/trac/wiki/DocManualsearch>,
I still have to find how to do that...
In the meantime, here under the first postgis/suggest example simplified
with the minimal attributes needed:
<searchitem name="cities_suggest_pg" description="Cities Suggest PG">
<layer type="postgis" name="cities10000eu_pg">
<field type="s" name="name" description="City" wildcard="2">
<definition type="suggest" connectiontype="db" sort="asc"
minlength="1">
<dsn
encoding="UTF-8">pgsql://postgres:postgres@localhost/gisdb</dsn>
<sql>SELECT DISTINCT name FROM cities10000eu_pg ORDER
BY name</sql>
</definition>
</field>
</layer>
</searchitem>
On Thu, Apr 12, 2012 at 5:48 AM, Armin Burger <[email protected]>wrote:
> why don't you try a definition similar to the settings from the wiki
> for exactly Postgis and suggest (there is one...)? you are for sure
> missing the <sql> tag. And when it works update the wiki and explain
> in more detail what parameters are required...
>
> On Thu, Apr 12, 2012 at 1:34 PM, Chris forum <[email protected]> wrote:
> > Wow, thanx for the fast answer!
> > I wasn't clear sorry, the 2 following lines were supposed to tell what I
> did
> > to correct each related error:
> > => apt-get install php-mdb2
> > => apt-get install php-mdb2-driver-pgsql
> > So the 2 missing packages are already installed.
> >
> > But now I have this error, with which I don't know what to do:
> >
> > [error] [client 127.0.0.1] ===== P.MAPPER: DB ERROR =====\nStandard
> > Message: MDB2 Error: not found\nDBMS/Debug Message: no RDBMS driver
> > specified
> >
> > Any idea?
> >
> >
> >
> > On Thu, Apr 12, 2012 at 5:21 AM, Armin Burger <[email protected]>
> > wrote:
> >>
> >> well, your operating systems already tells you the commands for
> >> installing the missing packages ("apt-get install....") ...
> >>
> >> in addition, you can search for MDB2 on the wiki, there you'll get
> >> e.g. a link to
> >>
> >> http://svn.pmapper.net/trac/wiki/UpgradeOlderVersions
> >>
> >> armin
> >
> >
>
------------------------------------------------------------------------------
For Developers, A Lot Can Happen In A Second.
Boundary is the first to Know...and Tell You.
Monitor Your Applications in Ultra-Fine Resolution. Try it FREE!
http://p.sf.net/sfu/Boundary-d2dvs2
_______________________________________________
pmapper-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/pmapper-users