<html dir="ltr">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<style>
<!--
@font-face
        {font-family:Calibri}
p.MsoNormal, li.MsoNormal, div.MsoNormal
        {margin:0in;
        margin-bottom:.0001pt;
        font-size:11.0pt;
        font-family:"Calibri","sans-serif"}
a:link, span.MsoHyperlink
        {color:blue;
        text-decoration:underline}
a:visited, span.MsoHyperlinkFollowed
        {color:purple;
        text-decoration:underline}
span.EmailStyle17
        {font-family:"Calibri","sans-serif";
        color:windowtext}
.MsoChpDefault
        {font-family:"Calibri","sans-serif"}
@page WordSection1
        {margin:1.0in 1.0in 1.0in 1.0in}
-->
</style><style id="owaParaStyle" type="text/css">P {margin-top:0;margin-bottom:0;}</style>
</head>
<body ocsi="0" fpstyle="1" lang="EN-US" link="blue" vlink="purple">
<div style="direction: ltr;font-family: Tahoma;color: #000000;font-size: 10pt;">Is your spatial query just a bbox? If so then just set that as your map extent as part of doing your attribute query (attributes always do both). There are other options too, let
 us know more what your spatial query is.<br>
<br>
Steve<br>
<br>
<div style="font-family: Times New Roman; color: #000000; font-size: 16px">
<hr tabindex="-1">
<div style="direction: ltr;" id="divRpF55654"><font color="#000000" face="Tahoma" size="2"><b>From:</b> mapserver-users-bounces@lists.osgeo.org [mapserver-users-bounces@lists.osgeo.org] on behalf of Bistrais, Bob [Bob.Bistrais@maine.gov]<br>
<b>Sent:</b> Friday, February 08, 2013 10:01 AM<br>
<b>To:</b> mapserver-users@lists.osgeo.org<br>
<b>Subject:</b> [mapserver-users] Combined spatial and attribute query<br>
</font><br>
</div>
<div></div>
<div>
<div class="WordSection1">
<p class="MsoNormal">Does anyone have advice on the best or most efficient way to query data, involving both a spatial and an attribute query.  I need to query several layers, selecting based on an area, then select from that selection based on an attribute
 value.  It would be OK to query by the attribute first, then spatial.  </p>
</div>
</div>
</div>
</div>
</body>
</html>