<DIV>Hi! Alberto,</DIV>
<DIV>Thank you very much for you code.</DIV>
<DIV>I really need to modify the query.phtml to displaying the attribute information I want to display.</DIV>
<DIV>Could you give a little more explaination about you code?</DIV>
<DIV>INFO, NUM_FOGLIO, NUM_PART, AREA&nbsp;are the attribute in shapefile you want to display. What is "INFO_ID" and "ESPR1"?</DIV>
<DIV>&nbsp;</DIV>
<DIV>Thank you very much for your time.</DIV>
<DIV>&nbsp;</DIV>
<DIV>Charlie<BR><BR><B><I>Alberto Cavalli &lt;alberto.cavalli@sintranet.it&gt;</I></B> wrote:</DIV>
<BLOCKQUOTE class=replbq style="PADDING-LEFT: 5px; MARGIN-LEFT: 5px; BORDER-LEFT: #1010ff 2px solid">Hi dear, for the benefit of the ewsgroup I'm going to post the code to make<BR>a custom query with some specification:<BR>The file that need to be modificated is query.phtml.in the proximity of line<BR>180 you can find a line like this: <BR>// loop and use key for titles<BR>foreach ($aRows[0] as $key =&gt; $value)<BR><BR><BR><BR>starting fron here replace it with this code:<BR><BR>// loop and use key for titles (add here only the field of dbf that you<BR>want to display)<BR>foreach ($aRows[0] as $key =&gt; $value)<BR>{<BR>if (strcasecmp($key, "INFO") == "INFO" ||<BR>strcasecmp($key, "NUM_FOGLIO") == "NUM_FOGLIO" ||<BR>strcasecmp($key, "NUM_PART") == "NUM_PART" ||<BR>strcasecmp($key, "AREA") == "AREA" )<BR><BR>$szReturnValue .= "<TD bgcolor='\"E2EFF5\"'><FONT<BR>face=\"Arial, Helvetica, sans-serif\" size=\"2\"&gt;".key."</FONT></TD>\n";<BR>}<BR>$szReturnValue .= "</TR>\n";<BR><BR>//
 loop through the results and format each row<BR>foreach ( $aRows as $aRow )<BR>{<BR>// add a row for each<BR>$szReturnValue .= "</TR>\n";<BR><BR>// loop and add a cell for each result (add here only the<BR>field thath you don't want to display)<BR>foreach ( $aRow as $key =&gt; $xCell )<BR>{<BR>if (strcasecmp($key, "INFO_ID") == 0 ||<BR>strcasecmp($key, "ESPR1") == 0)<BR>continue;<BR>$szReturnValue .= "<TD bgcolor='\"E2EFF5\"'><FONT<BR>face=\"Arial, Helvetica, sans-serif\" size=\"2\"&gt;".$xCell."</FONT></TD>\n";<BR>}<BR><BR>$szReturnValue .= "</TR>\n";<BR>}<BR><BR><BR><BR>I hope that this one can help someone<BR>bye<BR>Alberto<BR><BR><BR><BR><BR><BR><BR><BR><BR><BR><BR><BR><BR><BR><BR><BR><BR><BR><BR><BR><BR>_______________________________________________<BR>Maplab-users mailing list<BR>Maplab-users@lists.maptools.org<BR>http://lists.maptools.org/mailman/listinfo/maplab-users<BR></BLOCKQUOTE><p><br><hr size=1>Post your free ad now! <a href="http://ca.personals.yahoo.com/"><b>Yahoo!
 Canada Personals</b></a><br>