This message is in MIME format. Since your mail reader does not understand
this format, some or all of this message may not be legible.
------_=_NextPart_001_01C0378F.B9C0FC40
Content-Type: text/plain;
charset="iso-8859-1"
This is a little more database expensive, but it should work:
<cfloop list="#form.phone_number#" index="i" delimiters=",">
<cfquery name="deletePhone" datasource="#application.dsn#">
delete phone_detail where phone = '#i#'
</cfquery>
</cfloop>
hth,
Matt
-----Original Message-----
From: Anthony DeStefano
To: CF-Server
Sent: 10/16/00 10:28 AM
Subject: question about quotations
Telect Confidential
Sorry about the previous message. I forgot to cut out the top part
before
replying to the list-server. Here is a more legible version:
I have a simple form with multiple checkboxes on it. The checkboxes are
dynamically produced, so there could be anywhere from zero to a whole
bunch
of them. There is one for each phone number in an employee description
list.
I wanted the admin people to be able to check more than one box to
delete
more than phone number at a time if needed. So, I have all the
checkboxes
named the same so it returns a list like this:
5551212,18007652345,5551098
So, I was going to do a delete statement like:
delete phone_detail where phone in (#form.phone_number#)
Well, that would work great if the field was a Number field, but it is a
character field. So I tried doing a replace command to replace all the
commas with singlequote-comma-singlequote but that is trickier than it
sounds because the syntax is like this:
<cfset form.phone_number = replace(form.phone_number,",","','","ALL")>
All those quotes and commas mess up the function. If I do it like this:
<cfset form.phone_number = replace(form.phone_number,(,),(','),"ALL")>
it gives me a list like this: '5551212","18007652345","5551098'
But double quotes don't work in Oracle. If all else fails I will change
the
table so that the phone number field is a number rather than a varchar2.
But, this table is used by many other applications which would then have
to
be modified to reflect that change. And that is more hassle than it is
worth!
Any suggestions?
Thanks ...
Anthony DeStefano
[EMAIL PROTECTED]
The information contained in this message is privileged and
confidential. It is intended solely for the use of the named recipient.
If you are not the intended recipient, you are hereby notified that any
disclosure, copying, distribution, or use of the contents of this
transmission is strictly prohibited. If you receive this message in
error, please notify the sender immediately. Thank you.
------------------------------------------------------------------------
------
To unsubscribe, send a message to [EMAIL PROTECTED]
with 'unsubscribe' in the body or visit the list page at
www.houseoffusion.com
------_=_NextPart_001_01C0378F.B9C0FC40
Content-Type: text/html;
charset="iso-8859-1"
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN">
<HTML>
<HEAD>
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=iso-8859-1">
<META NAME="Generator" CONTENT="MS Exchange Server version 5.5.2650.12">
<TITLE>RE: question about quotations</TITLE>
</HEAD>
<BODY>
<P><FONT SIZE=2>This is a little more database expensive, but it should work:</FONT>
</P>
<P><FONT SIZE=2><cfloop list="#form.phone_number#" index="i"
delimiters=","></FONT>
<BR><FONT SIZE=2> <cfquery name="deletePhone"
datasource="#application.dsn#"></FONT>
<BR><FONT SIZE=2> delete phone_detail where phone = '#i#'</FONT>
<BR><FONT SIZE=2> </cfquery></FONT>
<BR><FONT SIZE=2></cfloop> </FONT>
</P>
<P><FONT SIZE=2>hth,</FONT>
<BR><FONT SIZE=2>Matt</FONT>
</P>
<P><FONT SIZE=2>-----Original Message-----</FONT>
<BR><FONT SIZE=2>From: Anthony DeStefano</FONT>
<BR><FONT SIZE=2>To: CF-Server</FONT>
<BR><FONT SIZE=2>Sent: 10/16/00 10:28 AM</FONT>
<BR><FONT SIZE=2>Subject: question about quotations</FONT>
</P>
<P><FONT SIZE=2>Telect Confidential</FONT>
</P>
<P><FONT SIZE=2>Sorry about the previous message. I forgot to cut out the top
part</FONT>
<BR><FONT SIZE=2>before</FONT>
<BR><FONT SIZE=2>replying to the list-server. Here is a more legible version:</FONT>
</P>
<P><FONT SIZE=2>I have a simple form with multiple checkboxes on it. The checkboxes
are</FONT>
<BR><FONT SIZE=2>dynamically produced, so there could be anywhere from zero to a
whole</FONT>
<BR><FONT SIZE=2>bunch</FONT>
<BR><FONT SIZE=2>of them. There is one for each phone number in an employee
description</FONT>
<BR><FONT SIZE=2>list.</FONT>
<BR><FONT SIZE=2>I wanted the admin people to be able to check more than one box
to</FONT>
<BR><FONT SIZE=2>delete</FONT>
<BR><FONT SIZE=2>more than phone number at a time if needed. So, I have all the</FONT>
<BR><FONT SIZE=2>checkboxes</FONT>
<BR><FONT SIZE=2>named the same so it returns a list like this:</FONT>
</P>
<P><FONT SIZE=2>5551212,18007652345,5551098</FONT>
</P>
<P><FONT SIZE=2>So, I was going to do a delete statement like:</FONT>
</P>
<P><FONT SIZE=2>delete phone_detail where phone in (#form.phone_number#)</FONT>
</P>
<P><FONT SIZE=2>Well, that would work great if the field was a Number field, but it is
a</FONT>
<BR><FONT SIZE=2>character field. So I tried doing a replace command to replace all
the</FONT>
<BR><FONT SIZE=2>commas with singlequote-comma-singlequote but that is trickier than
it</FONT>
<BR><FONT SIZE=2>sounds because the syntax is like this:</FONT>
</P>
<P><FONT SIZE=2><cfset form.phone_number =
replace(form.phone_number,",","','","ALL")></FONT>
</P>
<P><FONT SIZE=2>All those quotes and commas mess up the function. If I do it like
this:</FONT>
</P>
<P><FONT SIZE=2><cfset form.phone_number =
replace(form.phone_number,(,),(','),"ALL")></FONT>
</P>
<P><FONT SIZE=2>it gives me a list like this:
'5551212","18007652345","5551098'</FONT>
</P>
<P><FONT SIZE=2>But double quotes don't work in Oracle. If all else fails I will
change</FONT>
<BR><FONT SIZE=2>the</FONT>
<BR><FONT SIZE=2>table so that the phone number field is a number rather than a
varchar2.</FONT>
<BR><FONT SIZE=2>But, this table is used by many other applications which would then
have</FONT>
<BR><FONT SIZE=2>to</FONT>
<BR><FONT SIZE=2>be modified to reflect that change. And that is more hassle than it
is</FONT>
<BR><FONT SIZE=2>worth!</FONT>
</P>
<P><FONT SIZE=2>Any suggestions?</FONT>
<BR><FONT SIZE=2>Thanks ...</FONT>
</P>
<P><FONT SIZE=2>Anthony DeStefano</FONT>
<BR><FONT SIZE=2>[EMAIL PROTECTED]</FONT>
</P>
<BR>
<P><FONT SIZE=2>The information contained in this message is privileged and</FONT>
<BR><FONT SIZE=2>confidential. It is intended solely for the use of the named
recipient.</FONT>
<BR><FONT SIZE=2>If you are not the intended recipient, you are hereby notified that
any</FONT>
<BR><FONT SIZE=2>disclosure, copying, distribution, or use of the contents of
this</FONT>
<BR><FONT SIZE=2>transmission is strictly prohibited. If you receive this
message in</FONT>
<BR><FONT SIZE=2>error, please notify the sender immediately. Thank you.</FONT>
<BR><FONT
SIZE=2>------------------------------------------------------------------------</FONT>
<BR><FONT SIZE=2>------</FONT>
<BR><FONT SIZE=2>To unsubscribe, send a message to
[EMAIL PROTECTED]</FONT>
<BR><FONT SIZE=2>with 'unsubscribe' in the body or visit the list page at</FONT>
<BR><FONT SIZE=2>www.houseoffusion.com</FONT>
</P>
</BODY>
</HTML>
------_=_NextPart_001_01C0378F.B9C0FC40--
------------------------------------------------------------------------------
To unsubscribe, send a message to [EMAIL PROTECTED] with
'unsubscribe' in the body or visit the list page at www.houseoffusion.com