My apologies too ... you're absolutely 100% correct in that a situation like this, using cfif or iif will not make a difference.
My intentions certainly weren't to "be smart". Maybe I'm being naive in quoting Macromedia themselves, but they do publicly state that IIF requires more processing power as IIF is basically a shortcut way of using the Evaulate() function, but as I said, in a situation like the code posted it's not going to make a single bit of difference. Maybe I should have been clearer... me bad. One thing I will stand by though is that cfif is definately more readable than IIF :) Regardless of all that, Paul's code now does what he wants so everybody is happy :) Quoting "Russ Michaels (Snake)" <[EMAIL PROTECTED]>: > Sorry but I just get sick of people quoting that in some attempt to be smart > when they obviously haven't tested it. > > > > -----Original Message----- > > From: Andy Allan [mailto:[EMAIL PROTECTED] > > Sent: 20 September 2004 11:20 > > To: [EMAIL PROTECTED] > > Subject: RE: [ cf-dev ] Slect Multiple > > > > No need to be nasty ... the intention wasn't meant to start a > > debate about IIF. > > > > Andy > > > > Quoting "Russ Michaels (Snake)" <[EMAIL PROTECTED]>: > > > > > Oh don't start with that IIF performance , you must save > > 10000th of a > > > millisend crap please... It's pathetic. > > > > > > > > > > -----Original Message----- > > > > From: Andy Allan [mailto:[EMAIL PROTECTED] > > > > Sent: 20 September 2004 09:33 > > > > To: [EMAIL PROTECTED] > > > > Subject: RE: [ cf-dev ] Slect Multiple > > > > > > > > Wouldn't this do the trick... > > > > > > > > <select multiple name="ModifiedSize"> <cfoutput query="GetSizes"> > > > > <cfif SizeID eq GetItemsizes.FKSizeID> > > > > <option value="#SizeID#" selected="selected">#Size#</option> > > > > </cfif> > > > > <option value="#SizeID#">#Size#</option> </cfoutput> </select> > > > > > > > > And it's certainly better performance wise to use a > > normal cfif over > > > > IIF. > > > > > > > > Andy > > > > > > > > Quoting "Russ Michaels (Snake)" <[EMAIL PROTECTED]>: > > > > > > > > > Put the selected sizes in a list, and then when you > > loop over the > > > > > query to create the selectlist options, check if each value > > > > is in the list. > > > > > > > > > > E.G > > > > > > > > > > <cfset selectedItems = Valuelist(GetItemSizes.FKSizeIF)> > > > > > > > > > > <select multiple name="ModifiedSize"> <cfoutput > > query="GetSizes"> > > > > > <option value="#GetSizes.SizeID#" > > #IIF(Listcontains(SelectedItems, > > > > > SizeID), DE('selected'),DE(''))#>#GetSizes.Size#</option> > > > > > </cfoutput> > > > > > </select> > > > > > > > > > > Russ > > > > > > > > > > > -----Original Message----- > > > > > > From: Paul Swingewood [mailto:[EMAIL PROTECTED] > > > > > > Sent: 19 September 2004 21:11 > > > > > > To: [EMAIL PROTECTED] > > > > > > Subject: [ cf-dev ] Slect Multiple > > > > > > > > > > > > I have a modify form. I want to show the multiple values > > > > of a select > > > > > > that were cosen when the user entered the data. > > > > > > > > > > > > I have this.... > > > > > > > > > > > > <!--- This query gets those sizes that were selected ---> > > > > <cfquery > > > > > > name="GetItemSizes" datasource="#application.dsn#"> > > > > > > SELECT FKSizeID, > > > > > > FKItemID > > > > > > FROM tblItemSizes > > > > > > WHERE (FKItemID = #url.ItemID#) </cfquery> > > > > > > > > > > > > <!--- This query gets all possible sizes --> <cfquery > > > > > > name="GetSizes" datasource="#application.dsn#"> > > > > > > SELECT SizeID, Size > > > > > > FROM tblSizes > > > > > > WHERE 0=0 > > > > > > ORDER BY size ASC > > > > > > </cfquery> > > > > > > > > > > > > Ok now show the selection ... > > > > > > > > > > > > <tr> > > > > > > <td valign="top">Size :</td> > > > > > > <td valign="top"> > > > > > > <select multiple name="ModifiedSize"> <cfoutput > > > > > > query="GetSizes"> <cfif GetSizes.SizeID eq > > > > > > #GetItemsizes.FKSizeID#> <option value="#SizeID#" > > > > > > selected>#GetSizes.Size#</option> > > > > <cfelse> <option > > > > > > value="#GetSizes.SizeID#">#GetSizes.Size#</option> > > > > > > </cfif> > > > > > > </cfoutput> > > > > > > </select> > > > > > > </td> > > > > > > </tr> > > > > > > > > > > > > The thing is this shows only one selection :-( > > > > > > > > > > > > How do I loop coorectly to show all of the previous > > selections? > > > > > > > > > > > > Regards - Paul > > > > > > > > > > > > > > > > > > > > > > > > -- > > > > > > These lists are syncronised with the CFDeveloper forum at > > > > > > http://forum.cfdeveloper.co.uk/ > > > > > > Archive: > > > > http://www.mail-archive.com/dev%40lists.cfdeveloper.co.uk/ > > > > > > > > > > > > CFDeveloper Sponsors and contributors:- *Hosting and support > > > > > > provided by CFMXhosting.co.uk* :: > > > > > > *ActivePDF provided by activepdf.com* > > > > > > *Forums provided by fusetalk.com* :: *ProWorkFlow > > > > provided by > > > > > > proworkflow.com* > > > > > > *Tutorials provided by helmguru.com* :: *Lists > > > > hosted by > > > > > > gradwell.com* > > > > > > > > > > > > To unsubscribe, e-mail: > > [EMAIL PROTECTED] > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > -- > > > > > These lists are syncronised with the CFDeveloper forum at > > > > > http://forum.cfdeveloper.co.uk/ > > > > > Archive: > > > > > http://www.mail-archive.com/dev%40lists.cfdeveloper.co.uk/ > > > > > > > > > > CFDeveloper Sponsors and contributors:- *Hosting and > > > > support provided > > > > > by CFMXhosting.co.uk* :: *ActivePDF provided by > > > > > activepdf.com* > > > > > *Forums provided by fusetalk.com* :: *ProWorkFlow > > provided > > > > > by > > > > > proworkflow.com* > > > > > *Tutorials provided by helmguru.com* :: > > *Lists hosted > > > > > by > > > > > gradwell.com* > > > > > > > > > > To unsubscribe, e-mail: [EMAIL PROTECTED] > > > > > > > > > > > > > > > > > -- > > > > [EMAIL PROTECTED] > > > > www.creative-restraint.co.uk > > > > > > > > -- > > > > These lists are syncronised with the CFDeveloper forum at > > > > http://forum.cfdeveloper.co.uk/ > > > > Archive: > > http://www.mail-archive.com/dev%40lists.cfdeveloper.co.uk/ > > > > > > > > CFDeveloper Sponsors and contributors:- *Hosting and support > > > > provided by CFMXhosting.co.uk* :: > > > > *ActivePDF provided by activepdf.com* > > > > *Forums provided by fusetalk.com* :: *ProWorkFlow > > provided by > > > > proworkflow.com* > > > > *Tutorials provided by helmguru.com* :: *Lists > > hosted by > > > > gradwell.com* > > > > > > > > To unsubscribe, e-mail: [EMAIL PROTECTED] > > > > > > > > > > > > > > > > > > > > -- > > > These lists are syncronised with the CFDeveloper forum at > > > http://forum.cfdeveloper.co.uk/ > > > Archive: http://www.mail-archive.com/dev%40lists.cfdeveloper.co.uk/ > > > > > > CFDeveloper Sponsors and contributors:- *Hosting and > > support provided > > > by CFMXhosting.co.uk* :: *ActivePDF provided by > > > activepdf.com* > > > *Forums provided by fusetalk.com* :: *ProWorkFlow provided by > > > proworkflow.com* > > > *Tutorials provided by helmguru.com* :: *Lists hosted by > > > gradwell.com* > > > > > > To unsubscribe, e-mail: [EMAIL PROTECTED] > > > > > > > > > -- > > [EMAIL PROTECTED] > > www.creative-restraint.co.uk > > > > -- > > These lists are syncronised with the CFDeveloper forum at > > http://forum.cfdeveloper.co.uk/ > > Archive: http://www.mail-archive.com/dev%40lists.cfdeveloper.co.uk/ > > > > CFDeveloper Sponsors and contributors:- > > *Hosting and support provided by CFMXhosting.co.uk* :: > > *ActivePDF provided by activepdf.com* > > *Forums provided by fusetalk.com* :: *ProWorkFlow > > provided by proworkflow.com* > > *Tutorials provided by helmguru.com* :: *Lists > > hosted by gradwell.com* > > > > To unsubscribe, e-mail: [EMAIL PROTECTED] > > > > > > > > -- > These lists are syncronised with the CFDeveloper forum at > http://forum.cfdeveloper.co.uk/ > Archive: http://www.mail-archive.com/dev%40lists.cfdeveloper.co.uk/ > > CFDeveloper Sponsors and contributors:- > *Hosting and support provided by CFMXhosting.co.uk* :: *ActivePDF provided by > activepdf.com* > *Forums provided by fusetalk.com* :: *ProWorkFlow provided by > proworkflow.com* > *Tutorials provided by helmguru.com* :: *Lists hosted by > gradwell.com* > > To unsubscribe, e-mail: [EMAIL PROTECTED] > -- [EMAIL PROTECTED] www.creative-restraint.co.uk -- These lists are syncronised with the CFDeveloper forum at http://forum.cfdeveloper.co.uk/ Archive: http://www.mail-archive.com/dev%40lists.cfdeveloper.co.uk/ CFDeveloper Sponsors and contributors:- *Hosting and support provided by CFMXhosting.co.uk* :: *ActivePDF provided by activepdf.com* *Forums provided by fusetalk.com* :: *ProWorkFlow provided by proworkflow.com* *Tutorials provided by helmguru.com* :: *Lists hosted by gradwell.com* To unsubscribe, e-mail: [EMAIL PROTECTED]