> Oleria furfuracea > Parsonsia capularis > > I want to be able to convert this to a string like > > Oleria_furfuracea > Parsonsia_capularis > > so that links can be made like > > http://www.members.bush.org.nz/plant/fact.cfm?species=Aristote > lia_serrata > > How do I do this?
Well, you could do this by using the Replace function in your CFOUTPUT block: <cfoutput query="qPlantSpecies"> <a href="fact.cfm?species=#Replace(qPlantSpecies.Name, " ", "_", "ALL")#">#qPlantSpecies.Name#</a> </cfoutput> Instead, though, I'd recommend that you use the URLEncodedFormat function, which will replace spaces, or any other characters that are metacharacters within a URL, with the appropriate escape sequence (in the case of a space, it would be replaced with "%20"): <a href="fact.cfm?species=#URLEncodedFormat(qPlantSpecies.Name)#">... Or, better yet in some ways, you might pass the surrogate primary key within the URL, if you have one - typically, this would be a numeric unique identifier such as an identity column or a sequence. Dave Watts, CTO, Fig Leaf Software http://www.figleaf.com/ voice: (202) 797-5496 fax: (202) 797-5444 ______________________________________________________________________ Your ad could be here. Monies from ads go to support these lists and provide more resources for the community. http://www.fusionauthority.com/ads.cfm FAQ: http://www.thenetprofits.co.uk/coldfusion/faq Archives: http://www.mail-archive.com/[email protected]/ Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists

