<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN">
<HTML>
<HEAD>
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=iso-8859-1">
<META NAME="Generator" CONTENT="MS Exchange Server version 6.5.7638.1">
<TITLE>RE: mapquery issue</TITLE>
</HEAD>
<BODY>
<!-- Converted from text/rtf format -->
<P><FONT COLOR="#0000FF" FACE="Arial">Just to add some new stuff here:</FONT>
</P>
<P><FONT COLOR="#0000FF" FACE="Arial">The mapfile layer definition defines :</FONT>
</P>
<P><FONT COLOR="#0000FF" FACE="Courier New"> METADATA</FONT>
<BR><FONT COLOR="#0000FF" FACE="Courier New"> "id_attribute_string" "idcapt|string"</FONT>
<BR><FONT COLOR="#0000FF" FACE="Courier New"> END</FONT>
</P>
<P><FONT COLOR="#0000FF" FACE="Arial">The Postgresql table is defined as follow:</FONT>
</P>
<UL>
<P><FONT COLOR="#0000FF" FACE="Courier New">CREATE TABLE capteurs</FONT>
<BR><FONT COLOR="#0000FF" FACE="Courier New">(</FONT>
<BR><FONT COLOR="#0000FF" FACE="Courier New"> idcapt varchar NOT NULL,</FONT>
<BR><FONT COLOR="#0000FF" FACE="Courier New"> geom geometry,</FONT>
<BR><FONT COLOR="#0000FF" FACE="Courier New"> "type" varchar,</FONT>
<BR><FONT COLOR="#0000FF" FACE="Courier New"> CONSTRAINT capteurs_pkey PRIMARY KEY (idcapt),</FONT>
<BR><FONT COLOR="#0000FF" FACE="Courier New"> CONSTRAINT "SRID_GEOM_RULE" CHECK (srid(geom) = -1),</FONT>
<BR><FONT COLOR="#0000FF" FACE="Courier New"> CONSTRAINT "TYPE_GEOM_RULE" CHECK (geometrytype(geom) = 'POINT'::text OR geom IS NULL)</FONT>
<BR><FONT COLOR="#0000FF" FACE="Courier New">) </FONT>
<BR><FONT COLOR="#0000FF" FACE="Courier New">WITH OIDS;</FONT>
</P>
</UL>
<P><FONT COLOR="#0000FF" FACE="Arial">I notice that for capteurs element where the field "idcapt" is a numeric value ('1', '400'…) , everything is OK</FONT>
<BR><FONT COLOR="#0000FF" FACE="Arial">BUT if some alphanumeric apears in that field ('3F', 'F40'..), the mapquery getShapes() query fails as described…</FONT>
</P>
<P><FONT COLOR="#0000FF" FACE="Arial">Any reason?</FONT>
</P>
<P><FONT COLOR="#0000FF" FACE="Arial">Franck </FONT>
</P>
<P><FONT SIZE=1 FACE="Tahoma">_____________________________________________ </FONT>
<BR><B><FONT SIZE=1 FACE="Tahoma">De : </FONT></B> <FONT SIZE=1 FACE="Tahoma">zze-SIGALE PORTANERI F ext RD-BIZZ-SOP </FONT>
<BR><B><FONT SIZE=1 FACE="Tahoma">Envoyé : </FONT></B> <FONT SIZE=1 FACE="Tahoma">jeudi 22 mars 2007 17:12</FONT>
<BR><B><FONT SIZE=1 FACE="Tahoma">À : </FONT></B> <FONT SIZE=1 FACE="Tahoma">'cartoweb-users@lists.maptools.org'</FONT>
<BR><B><FONT SIZE=1 FACE="Tahoma">Cc : </FONT></B> <FONT SIZE=1 FACE="Tahoma">'Sylvain Pasche'</FONT>
<BR><B><FONT SIZE=1 FACE="Tahoma">Objet :</FONT></B> <FONT SIZE=1 FACE="Tahoma">mapquery issue</FONT>
</P>
<BR>
<P><FONT FACE="Arial">Hi,</FONT>
</P>
<P><FONT FACE="Arial">I have a mapquery plugin issue: While doing a queryByBbox() request on a area where one element must be found, the cartoclient display the following error: </FONT></P>
<P><FONT FACE="Courier New">class CartocommonException { protected $message = 'Error [8, Trying to get property of non-object, /exec/applis/sglpgo/G01R00C02/cartoweb3/coreplugins/query/server/ServerQuery.php, 122] Backtrace: file: 200 - /exec/applis/sglpgo/G01R00C02/cartoweb3/common/Common.php call: Common::cartowebErrorHandler() file: 122 - /exec/applis/sglpgo/G01R00C02/cartoweb3/coreplugins/query/server/ServerQuery.php call: Common::cartowebErrorHandler() file: 122 - /exec/applis/sglpgo/G01R00C02/cartoweb3/coreplugins/query/server/ServerQuery.php call: ServerQuery::resultToTable() file: 227 -</FONT></P>
<P><FONT FACE="Courier New">...</FONT>
</P>
<P><FONT FACE="Arial">Adding traces to the log and trying to analyse it, it looks like the serveurMapquery plugin found one element and the extractResults $msLayer->getResult($i) return an object as follow:</FONT></P>
<P><FONT FACE="Courier New">Thu Mar 22 16:25:22 2007,703 [30941] DEBUG ServerMapquery - class stdClass {</FONT>
<BR><FONT FACE="Courier New"> public $shapeindex = 1841530366;</FONT>
<BR><FONT FACE="Courier New"> public $tileindex = -1;</FONT>
<BR><FONT FACE="Courier New"> public $classindex = 6;</FONT>
<BR><FONT FACE="Courier New">}</FONT>
</P>
<P><FONT FACE="Arial">Which is return a shape to the ServerQuery plugin as follow:</FONT>
</P>
<P><FONT FACE="Courier New">Thu Mar 22 16:25:22 2007,704 [30941] DEBUG ServerQuery - resultshape=</FONT>
<BR><FONT FACE="Courier New">Thu Mar 22 16:25:22 2007,705 [30941] DEBUG ServerQuery - array (</FONT>
<BR><FONT FACE="Courier New"> 0 => false,</FONT>
<BR><FONT FACE="Courier New">)</FONT>
</P>
<P><FONT FACE="Arial">Any clue?</FONT>
</P>
<BR>
<P><FONT FACE="Arial">Thanks in advance,</FONT>
<BR><FONT FACE="Arial">Franck</FONT>
</P>
<BR>
<BR>
</BODY>
</HTML>