You are passing URL.PID to the page. SO: DELETE FROM profile WHERE profile_ID = <cfqueryparam cfsqltype="CF_SQL_VARCHAR" value="#URL.PID#">
This assuming profile_ID is a VARCHAR -----Original Message----- From: phumes1 [mailto:[EMAIL PROTECTED]] Sent: dinsdag 5 februari 2002 14:23 To: CF-Talk Subject: RE: Deleting entries from database OK..so I have a anchor from my index.cfm file which does a listing of all the fields from the database. <A HREF="env_delete_action.cfm?PID=#GetEnv.Profile_ID#&DID=#GetEnv.env _va r#&DEST=#GetEnv.destination#">[Delete]</A> By clicking on the "Delete" link the variables are passed to another form that I want to perform the delete function. I'm stuck in the WHERE ... I don't want to delete every record! <cfquery name="update_profile" datasource="profiles"> Delete from profile (profile_ID, env_var, destination) WHERE ??? </cfquery> At 02:05 PM 2/5/2002 +0100, you wrote: >The syntax is incorrect: INSERT INTO ... > >For DELETE: >DELETE FROM table >WHERE your filters !!!! > >PS don't forget the filters or you delete every record in the table > >-----Original Message----- >From: phumes1 [mailto:[EMAIL PROTECTED]] >Sent: dinsdag 5 februari 2002 14:05 >To: CF-Talk >Subject: re: Deleting entries from database > > >Hi, > >I have the following code that inserts fields into my database. > ><cfquery name="update_profile" datasource="profiles"> > Delete into profile > (profile_ID, env_var, destination) > VALUES > ('#FORM.profile_ID#', '#FORM.env_var#', '#FORM.destination#') ></cfquery> > > >I would also like to delete entries. Whats the syntax to do so? > > ______________________________________________________________________ Dedicated Windows 2000 Server PIII 800 / 256 MB RAM / 40 GB HD / 20 GB MO/XFER Instant Activation � $99/Month � Free Setup http://www.pennyhost.com/redirect.cfm?adcode=coldfusiona 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

