this is related to old code in query/squery.php using deprecated Postgis 
functions. This was working with Postgis up to version 1.5.x, but not 
any more with v2.x where the deprecated functions have been removed.

p.mapper 4.3 should have this fixed thanks to Thomas Raffin. In your 
case you need to edit the file
   incphp/query/squery.php
and change inside function dumpPGQueryResults "xmin" to "ST_xmin" and so 
forth. So it should look like

$query = "SELECT $unique_field,
                      ST_xmin(box3d($geom)),
                      ST_ymin(box3d($geom)),
                      ST_xmax(box3d($geom)),
                      ST_ymax(box3d($geom)),
                      $select
                 FROM $dbtable
                WHERE $queryStr
                LIMIT $searchlimit";

The changeset
   http://svn.pmapper.net/trac/changeset/1272
lists all parts of the code where this was updated.

In principal it should also just be fine replacing the whole squery.php 
with the one of p.mapper 4.3

Armin

On 03/03/2013 11:13 AM, Suman wrote:
> Hi all Pmapper User
> I am using ms4w v3.0.6. , mapserver v6.0.3, PHP v5.4.3. and pmapper 4.2.0.
> When I run a query on a PostGIS table I can see suggestions but when i click
> them no any response.
> This is my inline search.xml
> --------------------------------------------------------------------------------------------------
> <searchlist version="1.0">
>          <dataroot>$</dataroot>
>
>          <searchitem name="Utility_and_services" description="Utility and
> services suggest">
>              <layer type="postgis" name="Utility_and_services">
>                  <field type="s" name="name" description="Utility and
> services suggest" wildcard="2">
>                      <definition type="suggest" connectiontype="db"
> minlength="1" startleft="1" sort="asc" dependfld="gid">
>                          <dsn
> encoding="UTF-8">pgsql://postgres:postgres@localhost:5432/gisdb</dsn>
>                                               <sql>SELECT DISTINCT name FROM 
> public.tbl_utility WHERE name ~*
> '^[search]' ORDER BY name</sql>
>                                       </definition>
>                  </field>
>              </layer>
>          </searchitem>
>      </searchlist>
> ---------------------------------------------------------------------------------------------------
>
> and i found in chrome console invalid JSON
>
> Invalid JSON: <br />
> *Warning*:  pg_query(): Query failed: ERROR:  function xmin(box3d) does not
> exist
> LINE 2:                          xmin(box3d(geom)),
>                                   ^
> HINT:  No function matches the given name and argument types. You might need
> to add explicit type casts. in
> *C:\ms4w\apps\newbrt\biratnagar\incphp\query\squery.php* on line *712*<br />
> <br />
> *Warning*:  pg_numrows() expects parameter 1 to be resource, boolean given
> in *C:\ms4w\apps\newbrt\biratnagar\incphp\query\squery.php* on line *716*<br
> />
> {"mode":"search", "queryResult":0}
> pm_cjs.js:38
>
> i tried all above given suggestions but i cant solve this problem.. plz help
> me..
>
>
>
> --
> View this message in context: 
> http://pmapper-users-p-mapper-users-mailing-list.993774.n3.nabble.com/pmapper-users-search-xml-with-postgis-invalidJSON-tp2790207p4025076.html
> Sent from the pmapper-users -- p.mapper users mailing list mailing list 
> archive at Nabble.com.
>
> ------------------------------------------------------------------------------
> Everyone hates slow websites. So do we.
> Make your web apps faster with AppDynamics
> Download AppDynamics Lite for free today:
> http://p.sf.net/sfu/appdyn_d2d_feb
> _______________________________________________
> pmapper-users mailing list
> pmapper-users@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/pmapper-users
>

------------------------------------------------------------------------------
Everyone hates slow websites. So do we.
Make your web apps faster with AppDynamics
Download AppDynamics Lite for free today:
http://p.sf.net/sfu/appdyn_d2d_feb
_______________________________________________
pmapper-users mailing list
pmapper-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/pmapper-users

Reply via email to