Wow... I knew it would be dumb but I think that's a record low for me... Thanks!
-----Original Message----- From: Alan Rother [mailto:alan.rot...@gmail.com] Sent: Thursday, July 23, 2009 11:02 AM To: cf-talk Subject: Re: cfif, cfifelse problem... Invalid token '''... You spelled elseif wrong <cfesleif mid(current_route_id,1,2) IS "02"> should be <cfelseif On Thu, Jul 23, 2009 at 10:55 AM, Michael Stevens <bigm...@bigmikes.org>wrote: > > Forgive me for what will be a really dumb question. I'm not real > experienced with CF and it's been a long time since I've had to play > with it so I'm having trouble with an if/ifelse statement... > > Query (yeah, I know Recordset1 is bad, not my design): > <cfquery name="Recordset1" datasource="AR"> SELECT cust_id, bill_to, > add1, add2, city, state, zip, bill_phone_1, bill_fax, current_route_id > FROM "Customers" ORDER BY cust_id </cfquery> > > Output loop: > <cfoutput query="Recordset1"> > <cfset route = "Invalid"> > <cfif '#mid(current_route_id,1,2)#' IS "01"><cfset > route = "Phoenix"> > <cfesleif '#mid(current_route_id,1,2)#' IS > "02"><cfset route = "P"> > <cfesleif '#mid(current_route_id,1,2)#' IS > "03"><cfset route = "M"> > <cfesleif '#mid(current_route_id,1,2)#' IS > "04"><cfset route = "S"> > <cfesleif '#mid(current_route_id,1,2)#' IS > "05"><cfset route = "T"> > <cfesleif '#mid(current_route_id,1,2)#' IS > "07"><cfset route = "X"> > <cfesleif '#mid(current_route_id,1,2)#' IS > "08"><cfset route = "PU"> > <cfesleif '#mid(current_route_id,1,2)#' IS > "09"><cfset route = "UPS"> > <cfesleif '#mid(current_route_id,1,2)#' IS > "10"><cfset route = "G"> > <cfesleif '#mid(current_route_id,1,2)#' IS > "11"><cfset route = "Inactive"> > <cfesleif '#mid(current_route_id,1,3)#' IS > "A01"><cfset route = "A01"> > <cfesleif '#mid(current_route_id,1,3)#' IS > "A02"><cfset route = "A02"> > <cfesleif '#mid(current_route_id,1,3)#' IS > "A03"><cfset route = "A03"> > <cfesleif '#mid(current_route_id,1,3)#' IS > "A04"><cfset route = "A04"> > </cfif> > <!-- Outputs the variables in Recordset in a table --> > </cfoutput> > > I'm getting an error "Invalid token ''' found on line 80 at > column 51." > Line 80 is the first cfifelse statement. I've compared this statement > to other cfif/cfifelse statement in our code and nothing appears out > of the ordinary. Maybe ' means something I'm not aware of? > > Anyone see my obviously dumb mistake? > > Thanks, > > Mike > > > ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~| Want to reach the ColdFusion community with something they want? Let them know on the House of Fusion mailing lists Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:324882 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4