Hi Suzanne

I believe the problem is that you haven't bracketed your where conditions.
If I understand you correctly, you might try this:

WHERE two IS NULL
               AND ProjectShow='yes'
               AND (SecondaryMarket = '#URL.MarketName#'
               OR PrimaryMarket = '#URL.MarketName#')

This says two must be null and show must be yes and either the primary or
secondary market must be the one in the url.

Antony


On 3/16/07, Suzanne Wenger <[EMAIL PROTECTED]> wrote:
>
> 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>
>


~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
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:2775
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