mySQL overwrites records

User 1545 Photo


Registered User
26 posts

I am on the verge of success since the form results are getting to the database. The problem is that each time I submit a form the data gets written over an existing record. I tried a few things but thought some of the smart people here might have some suggestions. Any thoughts?
User 187934 Photo


Senior Advisor
20,193 posts

So it's not adding an addition line to the database?
I can't hear what I'm looking at.
It's easy to overlook something you're not looking for.

This is a site I built for my work.(RSD)
http://esmansgreenhouse.com
This is a site I built for use in my job.(HTML Editor)
https://pestlogbook.com
This is my personal site used for testing and as an easy way to share photos.(RLM imported to RSD)
https://ericrohloff.com
User 1545 Photo


Registered User
26 posts

Yes and no. It seems if I submit from the same computer multiple times it rewrites previous records from that computer. I just went to school and submitted a form and it DID write a new record. When I did it again on the same computer it overwrote that record.
User 1545 Photo


Registered User
26 posts

I dropped the table and then started to fill in forms again. The first form gave me an error, did not record the data but did set up the table. The next form recorded the data in row 1 without a problem. The next form overwrote the data on row 1 as did the next four forms. Can anyone help with this? Any suggestions would be helpful.
User 464893 Photo


Ambassador
1,611 posts

I think you should open a support ticket as when I get a form to write to a database or csv file it adds to the files not replaces them. Check the settings for the database you set up to receive the data.

The software is forced to create a table if it does not exist and add the record and from then on append further records. Same for the csv file it can write to.
I suspect it is the database or server problem. A program always does what it is programmed to do.

I wish mine would do what I want, not what I tell it
The Guy from OZ


User 382699 Photo


Registered User
9 posts

Hello,
I am setting up a new site using the above form builder as opposed to the classic builder

I have loaded two forms to an accounts page for testing. the forms load fine and send data to a database. My problem is that the form does not always add a new line to the database, it overwrites the last entry.

It seems to add a new line when I start up but following entries overwrite the last entry.

I seem to remember with the classic this may be a problem with cashed pages?

I have tried redirecting to a thankyou page to move off the accounts page, then link back to the page forcing it to reload, same problem.

I have cleared the cash and history reloaded accounts page to make sure it comes from server, same problem.

Any ideas, I would be very grateful, Happy Independence day for tomorrow from the UK .

Regards

Mike Cuffe
User 187934 Photo


Senior Advisor
20,193 posts

I see we recommended opening a support ticket for another user.:)
I can't hear what I'm looking at.
It's easy to overlook something you're not looking for.

This is a site I built for my work.(RSD)
http://esmansgreenhouse.com
This is a site I built for use in my job.(HTML Editor)
https://pestlogbook.com
This is my personal site used for testing and as an easy way to share photos.(RLM imported to RSD)
https://ericrohloff.com
User 382699 Photo


Registered User
9 posts

Hi Eric,

I have had a reply from Scott via the support room regarding this problem he recalls that another user had the same problem and is searching for the post. He seems to recall that it may be something to do with php 5.3 and was resolved. He advised I post on this forum hopefully to get a solution from the original
poster with the same problem... still looking.
User 1953598 Photo


Registered User
12 posts

This is happening to me now. I'm using version 2.0 Build 4263. Form creates only one record in MySQL database and the contents get replaced with each new form submission. Was there any solution found? Web host (Lunarpages) is using PHP version 5.2.17 and MySQL version 5.1.62-cll
User 2022022 Photo


Registered User
2 posts

I'm having the same problem. I'm pretty sure the issue is that the system backs up the database into a new table then creates a new table with the new row you are adding. When I go into my cpanel to see my database, there is now another table with the old rows. I remember choosing an option to backup the database but I don't remember where I did that! Was it in the form builder or was it when I created the database??

Have something to add? We’d love to hear it!
You must have an account to participate. Please Sign In Here, then join the conversation.