|
|
|||||||||
|
|||||||||
|
|||||||||
| |
|||
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Display Modes |
|
|
|
Stay one step ahead of the competition. Evaluate and give feedback
on some of the hottest web development tools on the market today.
Make your opinion heard! Click
Here
|
|
#1
|
|||
|
|||
|
I'm getting duplicate entries in my DB
I have some really simple code that takes data from established variables and throws them into the mySQL database. However, sometimes it is processed twice leading to duplication. I can't figure out why this is happening. Any suggestions? Here is the code:
// Enter their comments into the communication table $date = date("Y-m-d"); $type = "Initial"; mysql_query ("INSERT INTO communication (date, person, email, type, text) VALUES ( '$date', '$ID', '$email', '$type', '$comments')"); |
|
#2
|
||||
|
||||
|
Double-pump on the submit thanks to slow server response, maybe?
__________________
Please don't PM me asking for solutions outside the scope of a thread. Keeping all responses in a thread stands to help others who come along later, which is after all what this forum's all about. |
|
#3
|
|||
|
|||
|
It's not from hitting the submit button twice.
I tknow this because I've tested it by carefully clicking the button once. Even when I do it once, sometimes there will still end up being two entries in the db.
Thanks. |
|
#4
|
||||
|
||||
|
Maybe you're including a file twice under certain circumstances or something. I can't really provide any more help unless you paste your whole script in.
|
![]() |
| Viewing: Dev Articles Community Forums > Databases > MySQL Development > I'm getting duplicate entries in my DB |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|