Jump to content


Photo

Problems writing to MySQL


  • Please log in to reply
3 replies to this topic

#1 fingerprn

fingerprn
  • New Members
  • Pip
  • Newbie
  • 6 posts

Posted 25 February 2006 - 10:13 PM

I've been running a dating site written in php/mysql. Most of it was built by someone else and I've done some minor modifications. It works fine 99% of the time, but occassionally it makes small errors when writing a record to the database. For example, it might post a record for a new member and all of the info is correct except it doesn't post the "M" or "F" for male or female. Or it might be a logical field and it posts a "N" instead of a "Y".

Like I said, it posts most of the record correctly with a small exception like the ones above. Also, it might post 99 records correctly, but then one day I get a glitch.

I've only got about 500 members right now, so it's not a big deal. But when I get up to 5,000+ members, these glitches will become a daily occurance!

Do anyone know why this might happen? Is there any way of keeping this from happening? I've only been using PHP and MySQL for a year, so I'm not expert, but I'm assuming this isn't normal.

Thanks in advance for your suggestions.

#2 wickning1

wickning1
  • Members
  • PipPipPip
  • Advanced Member
  • 405 posts

Posted 26 February 2006 - 02:36 AM

It's impossible to say for certain without looking over the code. Could they just be users making errors?

#3 fingerprn

fingerprn
  • New Members
  • Pip
  • Newbie
  • 6 posts

Posted 26 February 2006 - 03:31 AM

[!--quoteo(post=349454:date=Feb 25 2006, 08:36 PM:name=wickning1)--][div class=\'quotetop\']QUOTE(wickning1 @ Feb 25 2006, 08:36 PM) View Post[/div][div class=\'quotemain\'][!--quotec--]
It's impossible to say for certain without looking over the code. Could they just be users making errors?
[/quote]


Not likely. I've got verifiers on all of the fields. However, I'm wondering if the verifiers could be causing the problem. For example, maybe if they get a verification error page and then go back to correct the mistake, some data gets lost in the process. I know that they have to re-enter password and state/city info after getting a verification error page. The person's sex doesn't get dropped under normal circumstances, but maybe it's happening under abnormal circumstances. For example, when I first tested the system, if made a mistake in filling out forms and got and error page and then did the same thing again, it would often not accept your record even if you finally got everything entered correctly. I got that problem fixed, but maybe there's another one hidden in there.

Believe it or not, your question helped me. Thanks! :)

#4 suma237

suma237
  • Members
  • PipPipPip
  • Advanced Member
  • 282 posts
  • Locationindia

Posted 11 June 2007 - 07:38 AM

Hi,
Please check the database type of the particular field.




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users