close ad
WARNING PC USERS: Do Not Install the DREAMWEAVER CC 2017 Update »
open ad
View Menu

Technical Support Forums

Free, outstanding support from WebAssist and your colleagues

rating

duplicate entry in database

Thread began 1/11/2010 2:46 pm by info271221 | Last modified 1/11/2010 6:22 pm by Jason Byrnes | 770 views | 3 replies |

info271221

duplicate entry in database

We are recieving a duplicating entry when we submit this form: member_directory_Insert.php

Sign in to reply to this post

Jason ByrnesWebAssist

need more details.

I have filled out your form a few times and got a few different errors ranging from Incorrect date time value: '12/2/2009' for column 'MDateOfEntry' to Data to long for column M1.


When you get the error "duplicate entry in database" it means you are trying to store a value that already exists in a column that has been set to not allow duplicates. most time it will happen if you are trying to set a value on the primary key column. review your database structure for columns that do not allow duplicates. Also double check the insert record behavior to make sure a value is not being set for the primary key column.

Sign in to reply to this post

info271221

duplicate entry not error

Hi Jason,

You can just fill out the first name and last name for testing purposes and then click the "Insert" button at the bottom of the page.

I'm not getting the errror "duplicate entry in database", I am just getting 2 of the exact listing in their when I click the "Insert" button once.

Thanks for your help! Let me know if you have any additional questions.

THANKS AGAIN!

Sign in to reply to this post

Jason ByrnesWebAssist

you need to create a recordset to see if the data being entered already exists. I would expect you wish to check for the first name last name combo, set the recordset to filter the first name, last name columns on the respective form elements.



next add sserver validation, use Number validation, set the variable to:
$totalRows_<Recordset Name>

where <Recordset Name>is the name of your recordset.

set the minimum number to -1 and the Maximum to 0

This will cause validation to pass only if the recordset is empty.

Sign in to reply to this post

Build websites with a little help from your friends

Your friends over here at WebAssist! These Dreamweaver extensions will assist you in building unlimited, custom websites.

Build websites from already-built web applications

These out-of-the-box solutions provide you proven, tested applications that can be up and running now.  Build a store, a gallery, or a web-based email solution.

Want your website pre-built and hosted?

Close Windowclose

Rate your experience or provide feedback on this page

Account or customer service questions?
Please user our contact form.

Need technical support?
Please visit support to ask a question

Content

rating

Layout

rating

Ease of use

rating

security code refresh image

We do not respond to comments submitted from this page directly, but we do read and analyze any feedback and will use it to help make your experience better in the future.

Close Windowclose

We were unable to retrieve the attached file

Close Windowclose

Attach and remove files

add attachmentAdd attachment
Close Windowclose

Enter the URL you would like to link to in your post

Close Windowclose

This is how you use right click RTF editing

Enable right click RTF editing option allows you to add html markup into your tutorial such as images, bulleted lists, files and more...

-- click to close --

Uploading file...