You can ignore the rows with NULL or blank values from your query recordset.

.....
WHERE Color1 IS NOT NULL AND Color1 <> ''

If you need the records with NULL or blank values for some other purposes on
the same page, you could use the SQL function ISNULL to substitues NULLs
with other values, like this:

SELECT ISNULL(Color1,'0') as Color1
......

THEN in your form select element:


<select name="Color1">
<option value="">
<cfoutput query="select">
<cfif len(select.Color1) and select.Color1 neq "0">
    <option value="#select.Color1#"> #select.Color1#
</cfif>
</cfoutput>
</select>


----- Original Message -----
From: "Chad Gray" <[EMAIL PROTECTED]>


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