troubleshooting Question

Query List Results

Avatar of usky1
usky1 asked on
Web Servers
7 Comments1 Solution187 ViewsLast Modified:
I have a select list from a Query. below is the query and visit. The query is only displaying in the list the values that have been previously selected. For example if I have ten warehouse ID's, 1 through 10, and I have only elected three of those, then only the three will be shown in the select drop down. How do i show all the selection with the current selection, selected?

<cfquery name="Recordset1" datasource="#request.dataSource#">
SELECT Prods.ProductID, .Warehouses.WarehouseID, Warehouses.WarehouseCode
FROM Warehouses, Prods
WHERE Prods.WarehouseID = Warehouses.WarehouseID

------------Select Statement------------------------------
<select name="WarehouseID">
    <cfloop query="Recordset1">
      <option value="#recordset1.warehouseid#" <cfif #selectedwarehouseID# EQ #recordset1.warehouseid#>selected</cfif>>#recordset1.warehousecode#</option>
Join our community to see this answer!
Unlock 1 Answer and 7 Comments.
Start Free Trial
Learn from the best

Network and collaborate with thousands of CTOs, CISOs, and IT Pros rooting for you and your success.

Andrew Hancock - VMware vExpert
See if this solution works for you by signing up for a 7 day free trial.
Unlock 1 Answer and 7 Comments.
Try for 7 days

”The time we save is the biggest benefit of E-E to our team. What could take multiple guys 2 hours or more each to find is accessed in around 15 minutes on Experts Exchange.

-Mike Kapnisakis, Warner Bros