I'm building a product edit form that should show all product categories, but
for a particular product it'll show current categories, selected.
So I run two queries, one to grab all categories, the other to grab categories
that match the prodID in the linking/many table.
Here's what I've got so far. It doesn't work and I'm gettin' a little
frustrated cause this should be pretty easy.
<cfselect name="prodcat" label="Select category(ies)" required="yes"
multiple="yes" size="5">
<cfoutput query="listprodcategories" group="catID">
<cfloop query="listprodcategoriesbyprod">
<option value="#listprodcategories.catID#" <cfif
listprodcategories.catID EQ
listprodcategoriesbyprod.catID>selected</cfif>>#listprodcategories.catname#</option>
</cfloop>
</cfoutput>
</cfselect>
Right now, that shows one category listed 5 times in a row, zll selected. lol
Thanks,
Will
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Logware (www.logware.us): a new and convenient web-based time tracking
application. Start tracking and documenting hours spent on a project or with a
client with Logware today. Try it for free with a 15 day trial account.
http://www.houseoffusion.com/banners/view.cfm?bannerid=67
Message: http://www.houseoffusion.com/lists.cfm/link=i:4:221124
Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4
Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
Donations & Support: http://www.houseoffusion.com/tiny.cfm/54