When you have the following loop:
WHERE journoTown.townid IN (<cfloop index="b" list="#valuelist(storyTown.townid)#">'#b#'<cfif ListLast(valuelist(storyTown.townid)) NEQ b>, </cfif></cfloop>)
If b is only a number then how come the above line of code works perfectly. All of the id's are UUID and so you treat them as text strings but if 'b' is only the number then how come I get a comma put in the correct place?
Is it just a hole in CF or is there something in the above code that is making it work.
The output of the above line looks like this:
WHERE journoTown.townid IN ('50FBCBC1-50DA-4BC1-A31E3C1BCD87C706', '50FBE880-50DA-4BC1-A3BB3A2926C81DE5')
Now just a little confused...
Cheers
Dave
At 16:30 1/27/2003 +0000, you wrote:
Try this: WHERE MyVal IN ( <cfloop from="1" to="#ListLen(MyList)#" index="i"> <cfif i NEQ 1>,</cfif> '#ListGetAt(MyList, i)#' </cfloop>)-- ** Archive: http://www.mail-archive.com/dev%40lists.cfdeveloper.co.uk/ To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] For human help, e-mail: [EMAIL PROTECTED]
-- ** Archive: http://www.mail-archive.com/dev%40lists.cfdeveloper.co.uk/ To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] For human help, e-mail: [EMAIL PROTECTED]
