That fixed the issue, thank you!!

Suzanne Wenger
Marketing Coordinator
VIP Structures, Inc.
One Webster's Landing
Syracuse, New York 13202
315.471.5338 main phone
315.474.5338 x355 direct
315.471.5373 facsimile
Email: [EMAIL PROTECTED]

 VIP Structures, Inc. Architects who build




-----Original Message-----
From: Antony Sideropoulos [mailto:[EMAIL PROTECTED] 
Sent: Thursday, March 15, 2007 6:18 PM
To: SQL
Subject: Re: Were Clause Trouble on Page Refresh

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>
>




~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Upgrade to Adobe ColdFusion MX7
Experience Flex 2 & MX7 integration & create powerful cross-platform RIAs
http://www.adobe.com/products/coldfusion/flex2/?sdid=RVJQ 

Archive: http://www.houseoffusion.com/groups/SQL/message.cfm/messageid:2776
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