<select name="Color1">
        <option value="">
        <cfoutput query="select">
        <cfif select.color NEQ "">
      <option value="#select.Color1#"> #select.Color1#
        <CFELSE>
        </CFIF>
        </cfoutput>
</select>

HTH,

Jeff Garza
Lead Developer/Webmaster
Spectrum Astro, Inc.
480.892.8200
[EMAIL PROTECTED]
http://www.spectrumastro.com



-----Original Message-----
From: Chad Gray [mailto:[EMAIL PROTECTED]] 
Sent: Monday, June 25, 2001 9:59 AM
To: CF-Talk
Subject: Dropping Null fields from a Query


I am populating a drop down menu with a query from a database:

<select name="Color1">
        <option value="">
        <cfoutput query="select">
        <option value="#select.Color1#"> #select.Color1#
        </cfoutput>
</select>

Inside of the database there are NULL or blank entries.  So when i get the 
drop down populated i get a bunch of blank spaces.

Is there a way i can modify my CFOUTPUT so it does not display the blank 
entries into my Drop Down???

Thanks,
Chad
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Structure your ColdFusion code with Fusebox. Get the official book at 
http://www.fusionauthority.com/bkinfo.cfm

Archives: http://www.mail-archive.com/[email protected]/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists

Reply via email to