blurredvision Posted August 7, 2008 Share Posted August 7, 2008 Since the project I'm working on is too big to post here, I'm just wanting to get an idea of what can cause this, since I'm stumped. Basically, I have one piece of code about 150 lines long that handles pulling a series of stats from two different tables (one are home team stats, the other away team stats) of a MySQL database. I created it and tested it, and everything looked like it work beautifully. However, I started to notice that out of the 70 or 80 games I had entered so far, there are 5-10 instances where the pass attempts value is just duplicating what the pass completions shows. With 90% of the games, the pass completions and attempts show correctly, but with the other 10%, the pass attempts are the same as the pass completions. So I thought it was just an error on my entry, but after checking the games I've noticed this on, the database shows the correct values. The database values are correct, the code is correct, 90% of the time it's working fine. It's just these few games that show incorrectly, and it's only the home team. Can anyone give me any clue as to why this happening if everything is correct on my end? I've spotted this problem on two different computers, and I've also used different browsers, so I'm pretty sure the problem is with the database and not any kind of caching or something like that. There are only 5 tables, all MyISAM. Thanks for any insight on what to read up on or what to look for. Quote Link to comment Share on other sites More sharing options...
genericnumber1 Posted August 7, 2008 Share Posted August 7, 2008 I doubt it's more than an error in your code, but if you'd like you can call repeated queries (100 maybe?) on a different run-once php script and compare it with what the returned value SHOULD be. After enough tests you could tell whether or not it was your code or whether it was something else. Quote Link to comment Share on other sites More sharing options...
blurredvision Posted August 7, 2008 Author Share Posted August 7, 2008 I doubt it's more than an error in your code Well, the reason I don't think it is is because everything uses the same code and the same loop. Why would it return the value correctly 90% of the time, but return it incorrectly 10% of the time, when I visually verify that the value is correct in the database? This just baffles me. I'll take another look at it and do your suggestion, we'll see what happens. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.