Previous Thread
Next Thread
Print Thread
Rate Thread
Updating a table without emptying it first #285452
05/30/2005 3:44 PM
05/30/2005 3:44 PM
Joined: May 2005
Posts: 4
M
Musicarl Offline OP
Lurker
Musicarl  Offline OP
Lurker
M

Joined: May 2005
Posts: 4
We have a table that gets a lot of activity and has about 4,500 records. I update it by using PhpMyAdmin to empty the table and then replace it with a textfile. A few days ago, as soon as I emptied the table the server went as screwy as I've ever seen it. We would reboot, and it would still go crazy - not returning queries, not accepting passwords, etc. After 2 days, we were able to load the textfile and the server has been fine since.

Our tech people think the table was receiving queries and since there was nothing in it, some nasty loop situation occurred.

Is there a way to update a table with entirely new data without dropping it first? Any suggestion on how to solve this problem are appreciated.

Sponsored Links
Re: Updating a table without emptying it first [Re: bigjoeyc] #285453
05/30/2005 4:08 PM
05/30/2005 4:08 PM
Joined: May 2001
Posts: 550
Austria
A
Anno Offline
Code Monkey
Anno  Offline
Code Monkey
A

Joined: May 2001
Posts: 550
Austria
Did you drop it or only delete the content?

To delete the table content: DELETE FROM "tablename"

Then insert whatever you wish to insert.

To insert data into a table that already contains potentially the same data:

REPLACE INTO "tablename"

Re: Updating a table without emptying it first [Re: domain123] #285454
05/31/2005 5:17 PM
05/31/2005 5:17 PM
Joined: May 2005
Posts: 4
M
Musicarl Offline OP
Lurker
Musicarl  Offline OP
Lurker
M

Joined: May 2005
Posts: 4
That little checkbox allowing me to overwrite the data did the trick. Thanks for your help.


Donate Today!
Donate via PayPal

Donate to UBBDev today to help aid in Operational, Server and Script Maintenance, and Development costs.

Please also see our parent organization VNC Web Services if you're in the need of a new UBB.threads Install or Upgrade, Site/Server Migrations, or Security and Coding Services.
Recommended Hosts
We have personally worked with, and recommend, the following Web Hosts:
· Stable Host
· Blue Host
· Interserver.net
Visit us on Facebook
Member Spotlight
Gizmo
Gizmo
Portland, OR, USA
Posts: 5,779
Joined: January 2000
Show All Member Profiles 
Forum Statistics
Forums64
Topics37,482
Posts293,586
Members13,811
Most Online1,498
Mar 17th, 2017
Top Posters(All Time)
AllenAyres 21,084
JoshPet 10,370
LK 7,395
Lord Dexter 6,709
Gizmo 5,779
Greg Hard 4,625
Top Posters(30 Days)
driv 19
isaac 17
Gizmo 6
Today's Statistics
Currently Online 908
Topics Created 0
Posts Made 0
Users Online 2
Birthdays 19
The UBB.Developers Network (UBB.Dev/Threads.Dev) is ©2000-2019 VNC Web Services

 
Powered by UBB.threads™ PHP Forum Software 7.7.2
(Snapshot build 20190304.dev)
PHP: 5.4.45 Page Time: 0.031s Queries: 15 (0.011s) Memory: 3.1870 MB (Peak: 3.4181 MB) Data Comp: Zlib Server Time: 2019-03-20 09:02:31 UTC