use this around your contactName <codesnip> <cfif trim(query.contactEmail) neq ""> <a href="mailto:#trim(contactEmail)#">#trim(contactName)#</a> <cfelse> #trim(contactEmail)# </cfif>
HTH Clint ----- Original Message ----- From: "mayo" <[EMAIL PROTECTED]> To: "CF-Talk" <[EMAIL PROTECTED]> Sent: Friday, June 13, 2003 11:19 AM Subject: efficient solution, problems with > I have a list of organizations, their email, address, phone, contact person > etc... > > The displayed table is as follows: > > Organization - Address - Phone - Contact Person > > <a href="mailto:#email#">Organization Name</a> - #address# - #phone# - > #contactPerson# > > > Now, things became a little more complicated. Some organizations have more > than one contact person and we want to have their names link to their > personal email. > > Here's the issue, some people have email accounts, others don't -- > incredible isn't it that some people still don't have email? :-} > > Anyway what I would like is for those that have email accounts to have their > names linked and for those that don't have email accounts to remain > unlinked. > > There are hundreds of names so I don't want to do a <cfif> on each .... err > I mean <cfswitch>. > > Two querries could be done, one with names with email and one without but > would it be more efficient than 100s of <cfswitch>? > > Not to mention that I'm not too sure on how I would be able to display the > querried solution. > > Each column name is linked allowing users to order (ASC & DESC) by that > column. > > thx. > > Gilbert Midonnet > > ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~| Archives: http://www.houseoffusion.com/cf_lists/index.cfm?forumid=4 Subscription: http://www.houseoffusion.com/cf_lists/index.cfm?method=subscribe&forumid=4 FAQ: http://www.thenetprofits.co.uk/coldfusion/faq Host with the leader in ColdFusion hosting. Voted #1 ColdFusion host by CF Developers. Offering shared and dedicated hosting options. www.cfxhosting.com/default.cfm?redirect=10481 Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4