Your problem is that as you iterate thru each query item, 5 of the
conditions will be met, e.g:
you are processing query button 3, so, at this moment 1,2,4,5 and 6 are
missing:
Try something like this (not tested):
<cfquery datasouce="data" name="info">
SELECT *
FROM Buttons
</cfquery>
<!--- Build a list of all the buttons found --->
<CFSET ButtonList = "">
<CFLOOP QUERY=info>
<CFSET ButtonList = ListAppend(ButtonList, Location)>
</CFLOOP>
<!--- Loop thru each "Potential" button to see if in the Found List --->
<SELECT NAME=Location>
<CFLOOP INDEX=thisButton FROM=1 TO=6>
<CFIF NOT ListFind(ButtonList, thisButton)>
<CFOUTPUT>
> <OPTION VALUE=#thisButton#>#thisButton#
</CFOUTPUT>
</CFIF>
</CFLOOP>
</SELECT>
HTH
Dick
At 5:06 AM -0400 7/29/00, [EMAIL PROTECTED] wrote:
>Ok, this is what i am trying to do....I want to look through my records in a
>table called Buttons. There is a field in the Buttons Table named Location.
>This field contains either a 1, 2, 3, 4, 5, or 6. What i want to do is
>dynamically populate a list box of the numbers that are NOT in the database.
>This is what i have so far, but i get messed up outputs..... can someone
>help me please????
>
><cfquery datasouce="data" name="info">
>SELECT *
>FROM Buttons
></cfquery>
>
><select name="Location">
>
> <cfoutput query="info">
> <cfif info.Location IS "1"> <cfelse>
> <option value="1">1</option>
> </cfif>
> <cfif info.Location IS "2"> <cfelse>
> <option value="2">2</option>
> </cfif>
> <cfif info.Location IS "3"> <cfelse>
> <option value="3">3</option>
> </cfif>
> <cfif info.Location IS "4"> <cfelse>
> <option value="4">4</option>
> </cfif>
> <cfif info.Location IS "5"> <cfelse>
> <option value="5">5</option>
> </cfif>
> <cfif info.Location IS "6"> <cfelse>
> <option value="6">6</option>
> </cfif>
></select>
>
>Now is there something i am doing wrong? should i be using a CFLOOP
>instead????
>
>Help me please....
>
>Thanks
>
>Kev
>------------------------------------------------------------------------------
>Archives: http://www.mail-archive.com/[email protected]/
>To Unsubscribe visit
>http://www.houseoffusion.com/index.cfm?sidebar=lists&body=lists/cf_tal
>k or send a message to [EMAIL PROTECTED] with
>'unsubscribe' in the body.
------------------------------------------------------------------------------
Archives: http://www.mail-archive.com/[email protected]/
To Unsubscribe visit
http://www.houseoffusion.com/index.cfm?sidebar=lists&body=lists/cf_talk or send a
message to [EMAIL PROTECTED] with 'unsubscribe' in the body.