Single quotes to double quotes

2002-06-14 Thread Stephen Judd

I have a form with a multi-select box.  In the action page I want to do a 
query with an IN clause based on the values (text) selected.


Here's the problem:

The list gets passed as: COUNTY='Belknap','Carroll','Cheshire'

The debug SQL looks like: ((towncounty.county) IN 
(''Belknap'',''Carroll'',''Cheshire''))

The cfquery piece is: ((towncounty.county) IN (#attributes.county#))

I know the query is okay, because I can hardcode 
('Belknap','Carroll','Cheshire') and it works.

Why are the single-quotes turning into double-quotes when I run the query?

Thanks, SJ


===
Stephen Judd, Local Area Network Manager
University of New Hampshire, Cooperative Extension
59 College Rd., G101 Taylor Hall
Durham, NH 03824-3587
email - [EMAIL PROTECTED]
voice (603) 862-2847
fax (603) 862-1585
===




__
Get the mailserver that powers this list at http://www.coolfusion.com
FAQ: http://www.thenetprofits.co.uk/coldfusion/faq
Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists



Re: Single quotes to double quotes

2002-06-14 Thread Jerry Johnson

They aren't double quotes, they are a pair of single quotes side by side.

This is called escaping the quotes.

Look at PreserveSingleQuotes to solve this.

Jerry Johnson

 [EMAIL PROTECTED] 06/14/02 02:37PM 
I have a form with a multi-select box.  In the action page I want to do a 
query with an IN clause based on the values (text) selected.


Here's the problem:

The list gets passed as: COUNTY='Belknap','Carroll','Cheshire'

The debug SQL looks like: ((towncounty.county) IN 
(''Belknap'',''Carroll'',''Cheshire''))

The cfquery piece is: ((towncounty.county) IN (#attributes.county#))

I know the query is okay, because I can hardcode 
('Belknap','Carroll','Cheshire') and it works.

Why are the single-quotes turning into double-quotes when I run the query?

Thanks, SJ


===
Stephen Judd, Local Area Network Manager
University of New Hampshire, Cooperative Extension
59 College Rd., G101 Taylor Hall
Durham, NH 03824-3587
email - [EMAIL PROTECTED] 
voice (603) 862-2847
fax (603) 862-1585
===





__
Structure your ColdFusion code with Fusebox. Get the official book at 
http://www.fusionauthority.com/bkinfo.cfm
FAQ: http://www.thenetprofits.co.uk/coldfusion/faq
Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists



Re: Single quotes to double quotes

2002-06-14 Thread Stephen Judd

Thank you kindly.  PreserveSingleQuotes solved it.

Steve

At 03:01 PM 6/14/2002 -0400, you wrote:
They aren't double quotes, they are a pair of single quotes side by side.

This is called escaping the quotes.

Look at PreserveSingleQuotes to solve this.

Jerry Johnson

  [EMAIL PROTECTED] 06/14/02 02:37PM 
 I have a form with a multi-select box.  In the action page I want to do a
 query with an IN clause based on the values (text) selected.


Here's the problem:

The list gets passed as: COUNTY='Belknap','Carroll','Cheshire'

The debug SQL looks like: ((towncounty.county) IN
(''Belknap'',''Carroll'',''Cheshire''))

The cfquery piece is: ((towncounty.county) IN (#attributes.county#))

I know the query is okay, because I can hardcode
('Belknap','Carroll','Cheshire') and it works.

Why are the single-quotes turning into double-quotes when I run the query?

Thanks, SJ


===
Stephen Judd, Local Area Network Manager
University of New Hampshire, Cooperative Extension
59 College Rd., G101 Taylor Hall
Durham, NH 03824-3587
email - [EMAIL PROTECTED]
voice (603) 862-2847
fax (603) 862-1585
===






__
Structure your ColdFusion code with Fusebox. Get the official book at 
http://www.fusionauthority.com/bkinfo.cfm
FAQ: http://www.thenetprofits.co.uk/coldfusion/faq
Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists