Frank, Use <cfif qWin.recordcount eq 0>
All queries return a recordcount value which is the number of returns in every query. Obviously, it returns a 0 when it does not contain any records. > -----Original Message----- > From: Frank V. [mailto:[EMAIL PROTECTED] > Sent: Wednesday, March 19, 2008 10:32 AM > To: CF-Newbie > Subject: RE: cfif issues. > > Hey guys, I tried the what u guys told me.... Still not solved. The > issue is that it keeps on going to ELSE, when NO WINNER has been > specified. In my DataSource I have in the table DailyWin in column > WINNER a default value of 0, so my query should check that if that value > is 0 then inserts the value of WINNER in WINNER and send the user to the > YOUWIN page, but right now all it's doing is sending the user to the TRY > again page. > > I don't know if I'm being clear or not lol > > Frank Velazquez > VicePresident > [EMAIL PROTECTED] > Office: 866.910.7327 EXT 302 > Cell: 786.537.5460 > Fax: 305.253.6435 > > > > > -----Original Message----- > From: Adrian Lynch [mailto:[EMAIL PROTECTED] > Sent: Wednesday, March 19, 2008 1:13 PM > To: CF-Newbie > Subject: RE: cfif issues. > > > Stick this in between the top query and the cfif: > > <cfoutput> > #qWin.Winner EQUAL 0# > </cfoutput> > > If that's false, it'll go to the else. > > Also, a style note, you can write <cfif #qWin.Winner# EQUAL '0'> as > <cfif qWin.Winner EQ 0>. It's up to you though :) > > Adrian > ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~| 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:3459 Subscription: http://www.houseoffusion.com/groups/CF-Newbie/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.15
