they use the preserve single quotes things because more often then not when you are using a cf variable inside a cfquery it is as a value to be inserted into the db and if it is a string it will be inside single quotes, SQL uses double single quotes as an escape sequence same as how cold fusion uses double double quotes as an escape sequence.
----- Original Message ----- From: "Gregory Harris" <[EMAIL PROTECTED]> To: "CF-Talk" <[EMAIL PROTECTED]> Sent: Wednesday, December 12, 2001 6:02 PM Subject: RE: Problems with single quotes and comma list > Cool thanks! I finally had some code that could have replaced with single > quotes but you reminded me of the preservesinglequotes function which was > also breaking my code when I wasn't using it. > > Any insight as to why they make they turn ' into '' when the > preservesinglequotes function is not used? I'm not sure I quite get that > part... > > Gregory Harris > [EMAIL PROTECTED] > > > -----Original Message----- > From: Tyler Clendenin [mailto:[EMAIL PROTECTED]] > Sent: Wednesday, December 12, 2001 2:55 PM > To: CF-Talk > Subject: Re: Problems with single quotes and comma list > > > oops the last message left out a double quote > here is the corrected version > > listname = "'" & LISTCHANGEDELIMS(listname, "','", ",") & "'" > inside query: preservesinglequotes(listname) > > ----- Original Message ----- > From: <[EMAIL PROTECTED]> > To: "CF-Talk" <[EMAIL PROTECTED]> > Sent: Wednesday, December 12, 2001 5:37 PM > Subject: Problems with single quotes and comma list > > > > Hey there, right now I've got a little puzzle I can't seem to solve right > > now I have a string > > > > 91766,91777,91778 (basically a comma delimited list of zip codes) > > > > That I need to fix up with single quotation marks so I can search against > > in > > a database string, basically like this > > > > '91766','91777','91778' etc. > > > > How would you go about doing this? All the functions I've tried seem to > > have > > problems with the single quotes vs. double quotes. Thanks! > > > > > > Gregory Harris > > [EMAIL PROTECTED] > > > > ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 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

