Ah, of course! Thanks for that. :) Naturally, if you loop over an empty
query, it loops 0 times. *sigh*

And I just remember how to check through the whole query in one if statement
without using a loop: <cfif ValueList(query) CONTAINS "value"> is right,
isn't it? It seems to work in the other place I used this syntax. (I really
do have to read over my code from time to time...)

Cheers,

Seona.

Email: [EMAIL PROTECTED]
Mobile: 0414 842 795

> -----Original Message-----
> From: [EMAIL PROTECTED]
> [mailto:[EMAIL PROTECTED]]On Behalf Of Toby
> Tremayne
> Sent: Thursday, 13 February 2003 4:20 PM
> To: CFAussie Mailing List
> Subject: [cfaussie] Re: Trying to figure out the syntax of a <cfif>
> statement
>
>
> Hi Seona,
>
>    is your query returning any results?  An empty query can cause this
>    kind of behaviour, as anything within the cfloop qill not be
>    executed...
>
> Toby
>
> Thursday, February 13, 2003, 4:15:56 PM, you wrote:
>
> SB> I believe that it is. All of my other selects have this
> option, and they all
> SB> work fine. In fact, if I take all the CF stuff from around
> the <option> tag,
> SB> the select works fine. So I'm guessing that what ever the
> problem is, it's
> SB> with the CF bits.
>
> SB> Thanks for the suggestion though. :)
>
> >> -----Original Message-----
> >> From: [EMAIL PROTECTED]
> >> [mailto:[EMAIL PROTECTED]]On Behalf Of
> Taco Fleur
> >> Sent: Thursday, 13 February 2003 3:48 PM
> >> To: CFAussie Mailing List
> >> Subject: [cfaussie] Re: Trying to figure out the syntax of a <cfif>
> >> statement
> >>
> >>
> >> Is the name="" a valid HTML attribute in a <option> tag?
> >> I believe not..
> >>
> >> Try it without..
> >>
> >> ----- Original Message -----
> >> From: "Seona Bellamy" <[EMAIL PROTECTED]>
> >> To: "CFAussie Mailing List" <[EMAIL PROTECTED]>
> >> Sent: Thursday, February 13, 2003 2:15 PM
> >> Subject: [cfaussie] Trying to figure out the syntax of a
> <cfif> statement
> >>
> >>
> >> > Hi all!
> >> >
> >> > I have a table which lists the feats a character has taken.
> >> Some of these
> >> > feats have a focus associated with them. The table has a simple
> >> structure:
> >> >
> >> > ID
> >> > CharacterName
> >> > FeatName
> >> > FeatFocus
> >> >
> >> > FeatFocus my be empty, or take a value if the feat has a focus.
> >> >
> >> > In the page where users select a feat to add to their list, I
> >> want to make
> >> > sure that they don't add something they already have. I've
> managed the
> >> > filtering for the feats where the focus comes from another
> table (i.e.,
> >> the
> >> > focus is on a skill, so the values they can select from are
> >> drawn from the
> >> > Skills table). Now I have a problem with one where I give a
> >> defined set of
> >> > values created by me.
> >> >
> >> > I have a query which selects all instances of the relevant
> feat and gets
> >> the
> >> > FeatFocus value.
> >> >
> >> > <cfquery name="q_SpellFocus" datasource="#request.dsn#">
> >> > SELECT FeatFocus
> >> > FROM FeatsByCharacter
> >> > WHERE (CharacterName = '#request.session.CharacterName#') AND
> >> (FeatName =
> >> > 'Spell Focus')
> >> > </cfquery>
> >> >
> >> > Then I'm trying to check and see if each option appears in the query
> >> > results. I tried to do a "contains" in the <cfif> statement,
> >> but it didn't
> >> > seem to like that. So now I'm playing with loops, but this
> seems to wipe
> >> all
> >> > the results. This is what I have so far:
> >> >
> >> > <select name="SpF_Focus">
> >> > <cfloop query="q_SpellFocus">
> >> > <cfif q_SpellFocus.FeatFocus IS NOT "Abjuration">
> >> > <option name="Abjuration" value="Abjuration">Abjuration</option>
> >> > </cfif>
> >> > <option name="Conjuration" value="Conjuration">Conjuration</option>
> >> > <option name="Divination" value="Divination">Divination</option>
> >> > (more options in here but I haven't played with them yet)
> >> > </cfloop>
> >> > </select>
> >> >
> >> > What this returns, is an empty select box. :(
> >> >
> >> > Can someone suggest a way to make this work? Should I be
> looking at the
> >> > query or the loop, or the if statement? I'm really not sure.
> >> >
> >> > Thanks in advance.
> >> >
> >> > Seona.
> >> >
> >> > Email: [EMAIL PROTECTED]
> >> > Mobile: 0414 842 795
> >> > ---
> >> > Outgoing mail is certified Virus Free.
> >> > Checked by AVG anti-virus system (http://www.grisoft.com).
> >> > Version: 6.0.449 / Virus Database: 251 - Release Date: 27/01/2003
> >> >
> >> >
> >> > ---
> >> > You are currently subscribed to cfaussie as: [EMAIL PROTECTED]
> >> > To unsubscribe send a blank email to
> >> [EMAIL PROTECTED]
> >> >
> >> > MX Downunder AsiaPac DevCon - http://mxdu.com/
> >> >
> >>
> >>
> >>
> >> ---
> >> You are currently subscribed to cfaussie as: [EMAIL PROTECTED]
> >> To unsubscribe send a blank email to
> >> [EMAIL PROTECTED]
> >>
> >> MX Downunder AsiaPac DevCon - http://mxdu.com/
> >>
> >> ---
> >> Incoming mail is certified Virus Free.
> >> Checked by AVG anti-virus system (http://www.grisoft.com).
> >> Version: 6.0.449 / Virus Database: 251 - Release Date: 27/01/2003
> >>
> SB> ---
> SB> Outgoing mail is certified Virus Free.
> SB> Checked by AVG anti-virus system (http://www.grisoft.com).
> SB> Version: 6.0.449 / Virus Database: 251 - Release Date: 27/01/2003
>
>
> SB> ---
> SB> You are currently subscribed to cfaussie as: [EMAIL PROTECTED]
> SB> To unsubscribe send a blank email to
> [EMAIL PROTECTED]
>
> SB> MX Downunder AsiaPac DevCon - http://mxdu.com/
>
>
>
>
>
>
>
>  ---------------------------------------
>
>              Life is poetry -
>                write it in your own words.
>
>  ---------------------------------------
>
> Toby Tremayne
> Technical Team Lead
> Code Poet and Zen Master of the Heavy Sleep
> Toll Solutions
> 154 Moray St
> Sth Melbourne
> VIC 3205
> +61 3 9697 2317
> 0416 048 090
> ICQ:  13107913
>
>
> ---
> You are currently subscribed to cfaussie as: [EMAIL PROTECTED]
> To unsubscribe send a blank email to
> [EMAIL PROTECTED]
>
> MX Downunder AsiaPac DevCon - http://mxdu.com/
>
> ---
> Incoming mail is certified Virus Free.
> Checked by AVG anti-virus system (http://www.grisoft.com).
> Version: 6.0.449 / Virus Database: 251 - Release Date: 27/01/2003
>
---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.449 / Virus Database: 251 - Release Date: 27/01/2003


---
You are currently subscribed to cfaussie as: [email protected]
To unsubscribe send a blank email to [EMAIL PROTECTED]

MX Downunder AsiaPac DevCon - http://mxdu.com/

Reply via email to