< CFIF > structure does not? What I am doing wrong?

Back at it. Hope, I understand that today. Thanks again. There is a particular problem. I have the DB set a Yes/No on elements within a < cfif > structure. However, when the structure is processed it does not recognize the structure and continues to return the < cfelse > instead. I tried to change the 1 to 1' and '1 '. I also tried using the isDefined('doubles'), but it does not work.

The previous page sends the URL.tName to this page.

< a href = "" onclick = "NewWindow ("/forms/T-Register.cfm? tName = #getTournaments.tName # & adate = #getTournaments.tDate #", 'Register', 750 900, 'Yes');" return false; "" > < img src="/images/regButton.jpg" width = "100" height = "22" / > < / a > "

As I said the DB fields for these below are the yes/no value, which is 1 or 0. Obviously, I do something wrong, but what? < Cfif > structure is not ignored because it returns the last element < cfelse >. The statements are true or false. At present, it is as if the statements are all playing as fake and the only thing that is true is the < cfelse >. Should I be scope < cfif > with the query? Any ideas out there. I'm not a scientific programmer of rocket, but know enough to get.

< name cfquery = "getTournaments" datasource = "RBDS" >

SELECT *.

OF tournamentFeatures

WHERE tName = ' #URL.tName # '.

< / cfquery >

<cfif tNom EQ #URL.tname # 'double' AND EQ 1>

"<!-#URL.tname # must have ' # ' sign around it, because it is to compare the"tNom"database to the URL.tname.

Also, the variable 'double' must be defined with graduations because you call the valur of the

-> database.

< div class = "redTextNORM" > This is a double tournament. Please fill out the required information to the other Member of the team.

<! - tool Tip Begin - >

< a href = "bowlingPartners.cfm" onClick ="return show_hide_box (this, 200, 425, '2px dotted', ' view')" > more information < /a > "

<! - tool tip - >

< / div >

< br / >

< div class = 'g' > < cfinput type = "text" name = "BowlerTwoName" value = "Name of melon 2" required = "yes" this.value ='Name of onblur = "if(this.value=='') melon 2'" onfocus = "if (this.value == 'Melon name 2') this.value =" "/ > < / div >"

"< div class = 'g' > < cfinput type ="text"name ="BowlerTwoBook"value ="Bowler 2 way"required =" ' this.value ='Bowler onblur = "if(this.value=='')" 2 medium ' "onfocus =" if (this.value == ' melon 2 "average") this.value = "" / > < / div >

< cfelseif tNom EQ #URL.tname # AND "threePerTeam" EQ "1" >

< div class = "redTextNORM" > this tournament consists of a team of three people. Please fill out the required information to the other members of the team.

<! - tool Tip Begin - >

< a href = "bowlingPartners.cfm" onClick ="return show_hide_box (this, 200, 425, '2px dotted', ' view')" > more information < /a > "

<! - tool tip - >

< / div >

< br / >

"< div class = 'g' > < cfinput type ="text"name ="BowlerTwoName"value =" "name of melon 2:" required = "yes" this.value =' onblur Name = "melon if(this.value=='') 2:'" onfocus = "if (" this.value ==' name of melon 2 :') this.value = "" / > < / div >) "

"< div class = 'g' > < cfinput type ="text"name ="BowlerTwoBook"value =" "Bowler 2 medium:" required don't = "' this.value ='Bowler onblur =" if(this.value=='') 2 average:' "onfocus =" if (' this.value =='Bowler 2 average :') this.value = "" / > < / div >) "

"< div class = 'g' > < cfinput type ="text"name ="BowlerThreeName"value =" "melon name 3:" required = "yes" this.value ='Name onblur = "melon if(this.value=='') 3:'" onfocus = "if (' this.value ==' name of melon 3 :') this.value =" "/ > < / div >)"

"< div class = 'g' > < cfinput type ="text"name ="BowlerThreeBook"value =" "Bowler 3 medium:" required not = "" this.value ='Bowler onblur = "if(this.value=='') 3 medium:'" onfocus = "if (' this.value ==' melon 3 average :') this.value =" "/ > < / div >)"

< cfelseif tNom EQ #URL.tname # AND 'fourPerTeam', it IS 'Yes' >

< div class = "redTextNORM" > this tournament consists of a team of four people. Please fill out the required information to the other members of the team.

<! - tool Tip Begin - >

< a href = "bowlingPartners.cfm" onClick ="return show_hide_box (this, 200, 425, '2px dotted', ' view')" > more information < /a > "

<! - tool tip - >

< / div >

< br / >

"< div class = 'g' > < cfinput type ="text"name ="BowlerTwoName"value =" "name of melon 2:" required = "yes" this.value =' onblur Name = "melon if(this.value=='') 2:'" onfocus = "if (" this.value ==' name of melon 2 :') this.value = "" / > < / div >) "

"< div class = 'g' > < cfinput type ="text"name ="BowlerTwoBook"value =" "Bowler 2 medium:" required don't = "' this.value ='Bowler onblur =" if(this.value=='') 2 average:' "onfocus =" if (' this.value =='Bowler 2 average :') this.value = "" / > < / div >) "

"< div class = 'g' > < cfinput type ="text"name ="BowlerThreeName"value =" "melon name 3:" required = "yes" this.value ='Name onblur = "melon if(this.value=='') 3:'" onfocus = "if (' this.value ==' name of melon 3 :') this.value =" "/ > < / div >)"

"< div class = 'g' > < cfinput type ="text"name ="bowlerThreeBook"value =" "Bowler 3 medium:" required not = "" this.value ='Bowler onblur = "if(this.value=='') 3 medium:'" onfocus = "if (' this.value ==' melon 3 average :') this.value =" "/ > < / div >)"

"< div class = 'g' > < cfinput type ="text"name ="BowlerFourName"value =" "melon name 4:" required = "yes" this.value ='Name onblur = "melon if(this.value=='') 4:'" onfocus = "if (' this.value ==' melon name 4 :') this.value =" "/ > < / div >)"

"< div class = 'g' > < cfinput type ="text"name ="BowlerFourBook"value =" "4 medium Bowler:" required don't = "" this.value ='Bowler onblur = "if(this.value=='') 4 medium:'" onfocus = "if (' this.value ==' melon 4 average :') this.value =" "/ > < / div >)"

< cfelseif tNom EQ #URL.tname # AND 'fivePerTeam', it IS 'Yes' >

< div class = "redTextNORM" > this tournament consists of a team of five people. Please fill out the required information to the other members of the team.

<! - tool Tip Begin - >

< a href = "bowlingPartners.cfm" onClick ="return show_hide_box (this, 200, 425, '2px dotted', ' view')" > more information < /a > "

<! - tool tip - >

< / div >

< br / >

"< div class = 'g' > < cfinput type ="text"name ="BowlerTwoName"value =" "name of melon 2:" required = "yes" this.value =' onblur Name = "melon if(this.value=='') 2:'" onfocus = "if (" this.value ==' name of melon 2 :') this.value = "" / > < / div >) "

"< div class = 'g' > < cfinput type ="text"name ="bowlerTwoBook"value =" "Bowler 2 medium:" required don't = "' this.value ='Bowler onblur =" if(this.value=='') 2 average:' "onfocus =" if (' this.value =='Bowler 2 average :') this.value = "" / > < / div >) "

"< div class = 'g' > < cfinput type ="text"name ="BowlerThreeName"value =" "melon name 3:" required = "yes" this.value ='Name onblur = "melon if(this.value=='') 3:'" onfocus = "if (' this.value ==' name of melon 3 :') this.value =" "/ > < / div >)"

"< div class = 'g' > < cfinput type ="text"name ="BowlerThreeBook"value =" "Bowler 3 medium:" required not = "" this.value ='Bowler onblur = "if(this.value=='') 3 medium:'" onfocus = "if (' this.value ==' melon 3 average :') this.value =" "/ > < / div >)"

"< div class = 'g' > < cfinput type ="text"name ="BowlerFourName"value =" "melon name 4:" required = "yes" this.value ='Name onblur = "melon if(this.value=='') 4:'" onfocus = "if (' this.value ==' melon name 4 :') this.value =" "/ > < / div >)"

"< div class = 'g' > < cfinput type ="text"name ="BowlerFourBook"value =" "4 medium Bowler:" required don't = "" this.value ='Bowler onblur = "if(this.value=='') 4 medium:'" onfocus = "if (' this.value ==' melon 4 average :') this.value =" "/ > < / div >)"

< div class = 'g' > < cfinput type = "text" name = "BowlerFiveName" value = "" name of melon 5: "required ="yes"this.value =' onblur Name =" melon if(this.value=='') 5: "" onfocus = "if (' this.value ==' name of melon 5 :') this.value =" "/ > < / div >)

"< div class = 'g' > < cfinput type ="text"name ="BowlerFiveBook"value =" "melon 5 average:" required not = "' this.value ='Bowler onblur =" if(this.value=='') 5 average:' "onfocus =" if (' this.value ==' melon 5 average :') this.value = "" / > < / div >) "

< cfelse >

< div class = "redTextNORM" > This is a tournament in singles < / div >

< cfinput type = "hidden" name = "singles" value = 1 >

< / cfif >

When a button is clicked on this page: http://www.renobowls.com/tournaments.cfm (Super non - Tap) which is defined as a 'double' tournament in the comic book.
He goes to this model (http://www.renobowls.com/forms/T-Register.cfm?tName=Super%20No-Tap & tDate = 12/13/09). The query must recognize it as a 'double' tournament, yet the model identifies as a 'singles' tournament The process must return two additional fields where the registrant adds other players name and member card number. As I said, the process is not recognize < cfif > structure and returns only one thing.

When I change to this:

< cfif tNom EQ #URL.tname # AND 'double' no IS NOT 1 >

This works. But it seems that backward. In the database (Super non - Tap) tournament has the value "1" or yes. < Cfif > rule is, but the tournament is not 'yes' or '1', then he must work around for the group following (cfif). I know its early but I feel a little crazy at this point.

First of all, properly scope your variables!  With so many variables to circulate in your code by using the same name, ColdFusion is likely to mingle and to provide unexpected results.  The scope of your variables as a rule, eliminate you this possibility completely and make your code more readable.

Secondly, when it comes to database bit/boolean (yes/no), ColdFusion will allow you to test them as such, rather than their trial as numeric values or values of string ' yes/no'... that is, "" will assess correctly, as "".  I prefer the former, because it eliminates the riddles on the question if I need to test for '1', 'yes' or 'true' to a value Boolean true.

So, instead of this:

I would recommend this as:

queryName.tName EQ URL.tName AND queryNamethrowing >

As long as the 'double' field cannot be null in your database, which will work very well.

Tags: ColdFusion

Similar Questions

Maybe you are looking for

  • Access ICloud and functionality issues

    I have a continuous problem that my guard unit invites me to update my iTunes password. I've updated several times by resetting the password. I am still unable to access the features in iCloud.

  • Satellite C850 - keyboard problems - double text 0 0 letter 4 s

    I HAVE a Satellite C850. When I hit the space bar, it automatically adds a '0' to the text. When I press the 'e', I also get an 'r' 0 and when I pr4ess the 'r' I also get a 4. Pr4essing the gives0 of also0 "y6" me a 6. This0 makes it0 impossible0 0 u

  • Equium A60 will read the cd but will not read DVDs

    Hello I got my laptop for about a year and a half, and it suddenly stopped playing DVDs. It reads the cd. I does not even recognize the toshiba boot disk which is on dvd, someone with ideas format. Thank you

  • Google instant

    We will get instant Google with this update?

  • printer HP f4280 not tested logo driver

    Compaq presario with xp serpack3, after a repair both ends, the software bed for f4200 message does not have the windows logo test. I had this printer running on a Compaq evo serv pack 2 and it still copies off the coast of the scanner.   No simple s