Below is a page I created listing items from a database using the Where clause 
to narrow down what’s shown. On this page are links that refresh the page 
with new criteria. When the page is refreshed not all of the Where clause 
works. The #MarketName# is shown correctly but the "Where two IS NULL" & "AND 
ProjectShow='yes'" do not narrow down the data. I get data showing that should 
not be. Do you know why this is and how can I circumvent this?

Here is a portion of my page:

<cfquery name="website" datasource="Website">
                SELECT * FROM MainTable 
                WHERE two IS NULL
                AND ProjectShow='yes'
                AND SecondaryMarket = '#URL.MarketName#' 
                OR PrimaryMarket = '#URL.MarketName#'
                ORDER BY YearOfBuild DESC;
</cfquery>
<cfinclude template="/inc/header.cfm">
<table>
  <tr>
    <td> 
      <table>
        <thead>
          <tr> 
            <td><a 
href="searchMarket.cfm?MarketName=Commercial">Commercial</a></td>
            <td><a 
href="searchMarket.cfm?MarketName=Industrial">Industrial</a></td>
            <td><a 
href="searchMarket.cfm?MarketName=Education">Educational</a></td>
            <td><a href="searchMarket.cfm?MarketName=Medical">Medical</a></td>
            <td><a href="searchMarket.cfm?MarketName=Civic">Civic</a></td>
            <td><a href="searchMarket.cfm?MarketName=Retail">Retail</a></td>
          </tr>          
        </thead>
      </table>
      <table>
        <tr>
          <td colspan="2">
          <cfoutput><h2>#URL.MarketName# Portfolio</h2>Click on a thumbnail to 
view more photos</cfoutput><br><br>
          </td>
        </tr>    
        <cfoutput query="website"> 
        <tr> 
          <td>
          <cfif #Image1Location# is ''>
          <cfelse><a style="border:none" 
href="Projects.cfm?ClientName=#URLEncodedFormat(website.ClientName)#&Method=#URLEncodedFormat(website.Method)#&TSF=#website.TotalSquareFootage#"
 onmouseover="return escape('<img src=\'#Image#\' width=\'450\'>')"><img 
src="#Image#" height="12" width="25" border="0"></a>
           </cfif>
           </td>
           <td>
           <cfif #Image1Location# is ''>#ClientName# 
           <cfelse>
           <a 
href="Projects.cfm?ClientName=#URLEncodedFormat(website.ClientName)#&Method=#URLEncodedFormat(website.Method)#&TSF=#website.TotalSquareFootage#"
 onmouseover="return escape('<img src=\'#Image#\' width=\'450\'>')"><Font 
Color="660000">#ClientName#</font></a>
           </cfif>
            
-&nbsp;#TotalSquareFootage#&nbsp;#ProjectDescription#,&nbsp;#RegionofLocation# 
<br>
           </td>
         </tr>
         </cfoutput> 
       </table>

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Create robust enterprise, web RIAs.
Upgrade & integrate Adobe Coldfusion MX7 with Flex 2
http://www.adobe.com/products/coldfusion/flex2/?sdid=RVJP

Archive: http://www.houseoffusion.com/groups/SQL/message.cfm/messageid:2774
Subscription: http://www.houseoffusion.com/groups/SQL/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.6

Reply via email to