<HTML>
<BODY>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=us-ascii">
<TITLE>Message</TITLE>

<META content="MSHTML 6.00.2800.1528" name=GENERATOR></HEAD>
<BODY>
<DIV><SPAN class=973510215-14022006><FONT face=Arial color=#0000ff size=2>The 
fields in postgis are lowercase and Mapserver is&nbsp;case sensitive so I think 
you have to make [NAME]&nbsp;&nbsp; [name].&nbsp; Also you need to put name as a 
field output in your subselect.</FONT></SPAN></DIV>
<BLOCKQUOTE dir=ltr style="MARGIN-RIGHT: 0px">
  <DIV></DIV>
  <DIV class=OutlookMessageHeader lang=en-us dir=ltr align=left><FONT 
  face=Tahoma size=2>-----Original Message-----<BR><B>From:</B> Bryce Bangerter 
  [mailto:bryceb@TULGAGAMES.COM] <BR><B>Sent:</B> Monday, February 13, 2006 8:39 
  PM<BR><B>To:</B> MAPSERVER-USERS@LISTS.UMN.EDU<BR><B>Subject:</B> 
  [UMN_MAPSERVER-USERS] Query Feature from a database 
source<BR><BR></FONT></DIV>
  <DIV><SPAN class=299453101-14022006><FONT face=Arial size=2>I've been looking 
  at the Itasca demo and see how they query a feature from a given layer.&nbsp; 
  I want to be able to do the same when my information is stored in a database, 
  but I have been unable to figure out how to do so.</FONT></SPAN></DIV>
  <DIV><SPAN class=299453101-14022006><FONT face=Arial 
  size=2></FONT></SPAN>&nbsp;</DIV>
  <DIV><SPAN class=299453101-14022006><FONT face=Arial size=2>I have the 
  following layer:</FONT></SPAN></DIV>
  <DIV><SPAN class=299453101-14022006><FONT face=Arial 
  size=2></FONT></SPAN>&nbsp;</DIV>
  <DIV><SPAN class=299453101-14022006><FONT face=Arial size=2>LAYER<BR>&nbsp; 
  NAME Machine_Outlines<BR>&nbsp; GROUP Machine<BR>&nbsp; CONNECTIONTYPE 
  postgis<BR>&nbsp; CONNECTION "host=localhost port=5432 dbname=thedatabase 
  password=thepassword user=testuser"<BR>&nbsp; DATA "outline FROM (SELECT 
  instance_id AS id, Translate(outline, X(position), Y(position), 0) AS outline 
  FROM instance INNER JOIN primitive_def_footprint&nbsp;ON 
  instance.primitive_def_id = primitive_def_footprint.primitive_def_id WHERE 
  primitive_type = 'machine') AS instance USING UNIQUE id USING 
  SRID=-1"<BR>&nbsp; TYPE POLYGON<BR>&nbsp; STATUS OFF<BR>&nbsp; 
  CLASS<BR>&nbsp;&nbsp;&nbsp; NAME 'Machine'<BR>&nbsp;&nbsp;&nbsp; OUTLINECOLOR 
  0 0 0<BR>&nbsp;&nbsp;&nbsp; COLOR 192 64 192</FONT></SPAN></DIV>
  <DIV><SPAN class=299453101-14022006><FONT face=Arial size=2>&nbsp;&nbsp;&nbsp; 
  TEMPLATE templates/Machines.html<BR>&nbsp; END</FONT></SPAN></DIV>
  <DIV><SPAN class=299453101-14022006><FONT face=Arial size=2>&nbsp; 
  </FONT></SPAN></DIV>
  <DIV><SPAN class=299453101-14022006><FONT face=Arial size=2>&nbsp; HEADER 
  "templates/Machines_header.html"<BR>&nbsp; FOOTER 
  "templates/Machines_footer.html"</FONT></SPAN></DIV><SPAN 
  class=299453101-14022006>
  <DIV><BR><FONT face=Arial size=2>END</FONT></DIV>
  <DIV><FONT face=Arial size=2></FONT>&nbsp;</DIV>
  <DIV><FONT face=Arial><FONT size=2>A<SPAN class=299453101-14022006>nd then 
  Machines.html looks like</SPAN></FONT></FONT></DIV>
  <DIV><FONT face=Arial><FONT size=2><SPAN 
  class=299453101-14022006>&lt;tr&gt;&lt;td&gt;[lrn]&lt;/td&gt;&lt;td&gt;[NAME]&lt;/td&gt;&lt;/tr&gt;</SPAN></FONT></FONT></DIV>
  <DIV><FONT face=Arial><FONT size=2><SPAN 
  class=299453101-14022006></SPAN></FONT></FONT>&nbsp;</DIV>
  <DIV><FONT face=Arial><FONT size=2><SPAN class=299453101-14022006>What I have 
  been unable to figure out is how to get [NAME] to represent the column 'name' 
  from the instance table of my database.</SPAN></FONT></FONT></SPAN></DIV>
  <DIV><FONT face=Arial size=2></FONT>&nbsp;</DIV>
  <DIV align=left><FONT face=Arial size=2>Bryce Bangerter</FONT></DIV>
  <DIV>&nbsp;</DIV></BLOCKQUOTE></BODY></HTML>


<P><hr size=1></P>
<P><STRONG>
The substance of this message, including any attachments, may be<br>
confidential, legally<br>
privileged and/or exempt from disclosure pursuant to Massachusetts<br>
law. It is intended<br>
solely for the addressee. If you received this in error, please<br>
contact the sender and<br>
delete the material from any computer.
</STRONG></P>
</BODY>
</HTML>