Advertisement

02.15.2008 at 07:34AM PST, ID: 23166254
[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!

6.2

MySQL Duplicate Insert Issue

Asked by v2Media in PHP and Databases, PHP for Windows, MySQL Server

I'm tracking a bug in mysql that results in duplicate insert queries. The php script executing the mysql queries runs fine on my dev server (XP IIS5 PHP 4.3.10)  with no duplicate inserts. When the script is run on the test server (Win 2K3 IIS6 PHP 4.3.10) the dupe insert bug presents. Both servers use the same mysql server, 5.0.27.

I've exhausted previous causes of this undesired dupe insert behaviour from previous experience:

--HTML/CSS validation errors (all fine)
--Javascript causing headers to send twice (this script has no javascript)
--Mishandled SESSIONs, javascript redirects and meta-refreshes (checked, nothing afoot)

I've monitored headers with FF LiveHeaders and the script is definately not submitting headers twice resulting in the queries executing twice.

I've also debugged by outputting all sql queries generated by this script to a log file with a microtime() stamp. The log shows no duplicate queries sent by the script, yet these duplicate records appear in the tables.

The only lead I have is that 3 out of 4 insert queries result in identical, duplicate records The 4th duplicate is not. The 4th sql nsert query gets two values from php variables storing mysql_insert_id() values from 2 previous insert queries. The original 4th record contains 2 correct mysql_insert_id() values, the duplicate 4th record has default '0' instead.

There doesn't seem to be anything wrong with the code since it runs 100% fine on XP+IIS5. PHP is configured pretty well much the same on both servers.

I've run out of ideas to debug further and any fresh perspectives would be appreciated.
Start Free Trial
[+][-]02.15.2008 at 07:52AM PST, ID: 20902815

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.

 
[+][-]02.15.2008 at 07:54AM PST, ID: 20902854

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.

 
[+][-]02.15.2008 at 08:08AM PST, ID: 20903003

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.

 
[+][-]02.15.2008 at 08:15AM PST, ID: 20903077

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.

 
[+][-]02.15.2008 at 08:54AM PST, ID: 20903541

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.

 
[+][-]02.15.2008 at 09:22AM PST, ID: 20903831

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.

 
[+][-]02.15.2008 at 02:02PM PST, ID: 20906450

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.

 
[+][-]02.15.2008 at 03:09PM PST, ID: 20906885

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.

 
[+][-]02.15.2008 at 03:38PM PST, ID: 20907038

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.

 
[+][-]02.20.2008 at 10:08PM PST, ID: 20945380

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

Zones: PHP and Databases, PHP for Windows, MySQL Server
Sign Up Now!
Solution Provided By: v2Media
Participating Experts: 4
Solution Grade: B
 
 
[+][-]02.21.2008 at 07:59PM PST, ID: 20954461

Experts Exchange has a courteous staff of administrators who help members get the most out of the website by means of administrative comments like this one.

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

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