try
<cfif qWin.Winner IS 0>

On Wed, Mar 19, 2008 at 1:09 PM, Frank Velazquez <[EMAIL PROTECTED]> wrote:
> Is this code correct??? I am trying to check a record in one of my data 
> sources, is this records equals 0 then proceeds to win page, else goes to try 
> again page. I am trying the code below, but it automatically goes to the try 
> again page. Can anyone help me?
>
>  CODE:
>
>  <cfquery name="qWin" datasource="Winners">
>          SELECT   Winner
>          FROM     DailyWin
>          WHERE    HuntId = <cfqueryparam cfsqltype="CF_SQL_NUMERIC" 
> value="#url.HuntId#">
>  </cfquery>
>
>  <cfif #qWin.Winner# EQUAL '0'>
>       <cfquery datasource="Winners">
>                UPDATE DailyWin
>                SET    Winner = <cfqueryparam cfsqltype="CF_SQL_VARCHAR" 
> value="Winner">,
>                WHERE  HuntId = <cfqueryparam cfsqltype="CF_SQL_VARCHAR" 
> value="#url.HunterId#">
>       </cfquery>
>       <cflocation
>                 url 
> ="YouWin.cfm?HuntId=#qHunt.HuntId#&PrizeId=#qPrize.PrizeId#&HunterId=#url.HunterId#"
>                 addToken = "No">
>  <cfelse>
>       <cflocation
>                 url 
> ="TryAgain.cfm?HuntId=#qHunt.HuntId#&PrizeId=#qPrize.PrizeId#&HunterId=#url.HunterId#"
>                 addToken = "No">
>                         </cfif>
>
>  

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Adobe® ColdFusion® 8 software 8 is the most important and dramatic release to 
date
Get the Free Trial
http://ad.doubleclick.net/clk;160198600;22374440;w

Archive: 
http://www.houseoffusion.com/groups/CF-Newbie/message.cfm/messageid:3456
Subscription: http://www.houseoffusion.com/groups/CF-Newbie/subscribe.cfm
Unsubscribe: 
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.15

Reply via email to