Advertisement

09.04.2008 at 10:08AM PDT, ID: 23703442
[x]
Attachment Details
[x]
The Solution Rating System

With so many solutions, how can you tell which solutions are most likely to help you and which ones are not? To provide you with a tool to use, we rate our solutions based on various elements that most accurately determine if a solution is a quality solution. To explain what factors affect the solution rating, here are the elements we take into consideration when formulating our solution rating.

  • The Grade of the Solution
  • The Zone Rank of the Expert Providing the Solution
  • The Number of Author and Expert Comments
  • The Number of Experts Contributing
  • The Feedback of the Community

Your Input Matters
Because of the way the system is set up, the most important variable in this equation is you. As a member of Experts Exchange, you are able to cast your vote on the quality of the solutions in regard to how complete, accurate, helpful and easy to understand each solution is. When you provide your feedback, each rating is adjusted accordingly. So, if you see a solution that has a poor rating that you think is a good solution, let us know by rating it. As you do, the rating will be adjusted and will become more accurate for other members of our site.

If you have any suggestions that you would like to make for our rating system, please ask a question in the Suggestions Zone of Community Support.

Thank you!

9.5

is there some way to avoid inserting a duplicate row without checking in advance of the insertion to see if the row already exists?

Asked by bitt3n in MySQL Server

I have a table list_word with fields (list_id, word_id), and I want insert records into this table such that if a given (list_id, word_id) pair already exists in the table, a duplicate pair does not get added. is there some way to do this without using a SELECT query in advance to check if a duplicate entry is about to be inserted?

for example, I could create a third field, 'stamp', which would consist of the string 'list_id*word_id' (eg, '123*4343'), and set stamp to UNIQUE to prevent additions of existing (list_id,word_id) pairs but this is just a hack. Is there a legitimate way to do it?

another solution, since all the inserts my script performs in a given execution will be for the same list_id, would be to select all word_id values paired with that list_id in the list_word table, and then check if each word_id is in this array before I insert it, which I guess would be faster at least.Start Free Trial
[+][-]09.04.2008 at 10:20AM PDT, ID: 22390072

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]09.04.2008 at 10:43AM PDT, ID: 22390337

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 7-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]09.04.2008 at 11:31AM PDT, ID: 22390968

View this solution now by starting your 7-day free trial. Setting up your free trial is quick, easy, and secure. We will return you to this solution, unlocked, when you're done.

 

About this solution

Zone: MySQL Server
Sign Up Now!
Solution Provided By: yodercm
Participating Experts: 2
Solution Grade: A
 
 
[+][-]09.04.2008 at 12:39PM PDT, ID: 22391759

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 7-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]09.04.2008 at 01:00PM PDT, ID: 22392001

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]09.04.2008 at 01:04PM PDT, ID: 22392047

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]09.05.2008 at 04:22AM PDT, ID: 22397389

Assisted solutions are selected by the member who asked the question as a comment that contributed to their question's solution.

Start your 7-day free trial to view this Assisted Solution or ask the Experts your question.

 
[+][-]09.05.2008 at 03:27PM PDT, ID: 22404380

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 7-day free trial to view this Author Comment or ask the Experts your question.

 
 
Loading Advertisement...
20080716-EE-VQP-32 / EE_QW_2_20070628