Question: How to stop my coldfusion Cfquery from insertering duplicate rows?

Question

How to stop my coldfusion Cfquery from insertering duplicate rows?

Answers 0
Added at 2016-12-15 19:12
Tags
Question

I have a very basic cfquery insert that is inserting my form information 3 times on submit.

Anyone know how to stop this?

Here is my form.

http://jsfiddle.net/DTcHh/27952/

And my page that the form is sent to contains the following cfquery :

    <cfquery datasource="OSAnet-College" result="qDonate">
        INSERT into V2_OnlineDonations(FNAME,LNAME,PHONE,EMAIL,CAUSE,DATEDONATE)
        VALUES (
        <cfqueryparam cfsqltype="cf_sql_varchar" value="#FORM.FNAME#">
        , <cfqueryparam cfsqltype="cf_sql_varchar" value="#FORM.LNAME#">
        , <cfqueryparam cfsqltype="cf_sql_varchar" value="#FORM.PHONE#">
        , <cfqueryparam cfsqltype="cf_sql_varchar" value="#FORM.EMAIL#">
        , <cfqueryparam cfsqltype="cf_sql_varchar" value="#FORM.CAUSE#">
        , <cfqueryparam cfsqltype="cf_sql_timestamp" value="#NOW()#">
        )
    </cfquery>

Any help would be appreciated.

Answers
Source Show
◀ Wstecz