Jump to content

Perventing Duplications


divinedesigns1

Recommended Posts

how can i pervent having duplications in my database?

Link to comment
Share on other sites

ok, that was a bad explaination, what i meant is how i can prevent having duplication in my database with the same information in the database itselflike if i was to insert "this is annoying as ######" and then i insert again "this is annoying as ######" i want it to cancel out the second "this is annoying as ######"

Link to comment
Share on other sites

did you check the link in post #3 ? It has lot of resource regarding this. you have to make it UNIQUE index so that no any duplicate entry could be inserted. If you insert same entry twice there will be an error.

Link to comment
Share on other sites

Guest So Called

Why don't you do a query first to find out if it's in the database, and then only when it's not in the database do your insert?

Link to comment
Share on other sites

If you're trying to stop the same person from repeatedly submitting something you can store what they've submitted in the session and each time check the data in the session to make sure they haven't already submitted it recently before adding it to the database.

Link to comment
Share on other sites

did you check the link in post #3 ? It has lot of resource regarding this. you have to make it UNIQUE index so that no any duplicate entry could be inserted. If you insert same entry twice there will be an error.
yup i have
If you're trying to stop the same person from repeatedly submitting something you can store what they've submitted in the session and each time check the data in the session to make sure they haven't already submitted it recently before adding it to the database.
ok that sound more like what im aiming for
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...