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_01BFDD0A.E847BC10
Content-Type: text/plain;
charset="iso-8859-1"
Hi,
Test for results after the <cfquery>
<cfif TestForExistingQuote.recordcount is NOT 0>
NOBLE(STAR
Beth Strichartz
Consultant
617.252.3322 voice
[EMAIL PROTECTED]
http://noblestar.com
-----Original Message-----
From: Chris Farrugia [mailto:[EMAIL PROTECTED]]
Sent: Thursday, June 22, 2000 9:25 PM
To: [EMAIL PROTECTED]
Subject: Checking for a record, and then deleting it
I have a table in a database that contains the fields CFID, CFTOKEN, WDDX
(which is an array that I used CFWDDX on), and the date. It is for a system
configurator for new computer systems. When someone fills in the forms for
what they want on their system, it puts it in a database, then they can
click a reconfigure button... that takes them back to the form they just
filled out so they can reconfigure their system. THen they hit the submit
button again and here I need to check if a record in the quotes table
already exists (meaning this is at least the second time they've configured
a system), and if it exists, then that record needs to be deleted. Here is
the code I've tried but it doesn't work:
<CFQUERY datasource="bwpc" name="TestForExistingQuote">
Select * FROM SystemQuote WHERE (CFID=#CFID# AND CFTOKEN=#CFTOKEN#)
</cfquery>
<CFOUTPUT Query="TestForExistingQuote">
<CFIF IsDefined('#WDDX#')>
<CFQUERY datasource="bwpc">
DELETE FROM SystemQuote WHERE CFID = #CFID#
</cfquery>
</cfif>
</cfoutput>
Does anybody know of a way of doing this? Thanks in advance.
----------------------------------------------------------------------------
--
Archives: http://www.eGroups.com/list/cf-talk
To Unsubscribe visit
http://www.houseoffusion.com/index.cfm?sidebar=lists&body=lists/cf_talk or
send a message to [EMAIL PROTECTED] with 'unsubscribe' in
the body.
------_=_NextPart_001_01BFDD0A.E847BC10
Content-Type: text/html;
charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN">
<HTML>
<HEAD>
<META HTTP-EQUIV=3D"Content-Type" CONTENT=3D"text/html; =
charset=3Diso-8859-1">
<META NAME=3D"Generator" CONTENT=3D"MS Exchange Server version =
5.5.2652.35">
<TITLE>RE: Checking for a record, and then deleting it</TITLE>
</HEAD>
<BODY>
<P><FONT SIZE=3D2>Hi,</FONT>
<BR><FONT SIZE=3D2>Test for results after the <cfquery></FONT>
</P>
<P><FONT SIZE=3D2><cfif TestForExistingQuote.recordcount is NOT =
0> </FONT>
</P>
<BR>
<P><FONT SIZE=3D2>NOBLE(STAR</FONT>
<BR><FONT SIZE=3D2>Beth Strichartz</FONT>
<BR><FONT SIZE=3D2>Consultant</FONT>
<BR><FONT SIZE=3D2>617.252.3322 voice</FONT>
<BR><FONT SIZE=3D2>[EMAIL PROTECTED]</FONT>
<BR><FONT SIZE=3D2><A HREF=3D"http://noblestar.com" =
TARGET=3D"_blank">http://noblestar.com</A></FONT>
</P>
<BR>
<P><FONT SIZE=3D2>-----Original Message-----</FONT>
<BR><FONT SIZE=3D2>From: Chris Farrugia [<A =
HREF=3D"mailto:[EMAIL PROTECTED]">mailto:coldfusion@bluewaterpc=
.com</A>]</FONT>
<BR><FONT SIZE=3D2>Sent: Thursday, June 22, 2000 9:25 PM</FONT>
<BR><FONT SIZE=3D2>To: [EMAIL PROTECTED]</FONT>
<BR><FONT SIZE=3D2>Subject: Checking for a record, and then deleting =
it</FONT>
</P>
<BR>
<P><FONT SIZE=3D2>I have a table in a database that contains the fields =
CFID, CFTOKEN, WDDX</FONT>
<BR><FONT SIZE=3D2>(which is an array that I used CFWDDX on), and the =
date. It is for a system</FONT>
<BR><FONT SIZE=3D2>configurator for new computer systems. When =
someone fills in the forms for</FONT>
<BR><FONT SIZE=3D2>what they want on their system, it puts it in a =
database, then they can</FONT>
<BR><FONT SIZE=3D2>click a reconfigure button... that takes them =
back to the form they just</FONT>
<BR><FONT SIZE=3D2>filled out so they can reconfigure their =
system. THen they hit the submit</FONT>
<BR><FONT SIZE=3D2>button again and here I need to check if a record in =
the quotes table</FONT>
<BR><FONT SIZE=3D2>already exists (meaning this is at least the second =
time they've configured</FONT>
<BR><FONT SIZE=3D2>a system), and if it exists, then that record needs =
to be deleted. Here is</FONT>
<BR><FONT SIZE=3D2>the code I've tried but it doesn't work:</FONT>
</P>
<P><FONT SIZE=3D2><CFQUERY datasource=3D"bwpc" =
name=3D"TestForExistingQuote"></FONT>
<BR><FONT SIZE=3D2>Select * FROM SystemQuote WHERE (CFID=3D#CFID# AND =
CFTOKEN=3D#CFTOKEN#)</FONT>
<BR><FONT SIZE=3D2></cfquery></FONT>
</P>
<P><FONT SIZE=3D2><CFOUTPUT =
Query=3D"TestForExistingQuote"></FONT>
<BR><FONT SIZE=3D2><CFIF IsDefined('#WDDX#')></FONT>
<BR> <FONT =
SIZE=3D2><CFQUERY datasource=3D"bwpc"></FONT>
<BR> <FONT SIZE=3D2>DELETE =
FROM SystemQuote WHERE CFID =3D #CFID#</FONT>
<BR> <FONT =
SIZE=3D2></cfquery></FONT>
<BR><FONT SIZE=3D2></cfif></FONT>
<BR><FONT SIZE=3D2></cfoutput></FONT>
</P>
<BR>
<P><FONT SIZE=3D2>Does anybody know of a way of doing this? =
Thanks in advance.</FONT>
</P>
<P><FONT =
SIZE=3D2>---------------------------------------------------------------=
---------------</FONT>
<BR><FONT SIZE=3D2>Archives: <A =
HREF=3D"http://www.eGroups.com/list/cf-talk" =
TARGET=3D"_blank">http://www.eGroups.com/list/cf-talk</A></FONT>
<BR><FONT SIZE=3D2>To Unsubscribe visit <A =
HREF=3D"http://www.houseoffusion.com/index.cfm?sidebar=3Dlists&body=3Dli=
sts/cf_talk" =
TARGET=3D"_blank">http://www.houseoffusion.com/index.cfm?sidebar=3Dlists=
&body=3Dlists/cf_talk</A> or send a message to =
[EMAIL PROTECTED] with 'unsubscribe' in the =
body.</FONT></P>
</BODY>
</HTML>
------_=_NextPart_001_01BFDD0A.E847BC10--
------------------------------------------------------------------------------
Archives: http://www.eGroups.com/list/cf-talk
To Unsubscribe visit
http://www.houseoffusion.com/index.cfm?sidebar=lists&body=lists/cf_talk or send a
message to [EMAIL PROTECTED] with 'unsubscribe' in the body.