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: 562
Austria
A
Anno Offline
Code Monkey
Anno  Offline
Code Monkey
A

Joined: May 2001
Posts: 562
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
JAISP
JAISP
PA
Posts: 458
Joined: February 2008
Show All Member Profiles 
Forum Statistics
Forums64
Topics37,453
Posts293,495
Members13,800
Most Online1,498
Mar 17th, 2017
Top Posters(All Time)
AllenAyres 25,587
JoshPet 11,330
Rick 8,373
LK 7,396
Lord Dexter 6,503
Gizmo 5,941
Greg Hard 5,533
Top Posters(30 Days)
isaac 8
Gizmo 3
Today's Statistics
Currently Online 852
Topics Created 0
Posts Made 0
Users Online 1
Birthdays 21
The UBB.Developers Network (UBB.Dev/Threads.Dev) is ©2000-2018 VNC Web Services

 
Powered by UBB.threads™ PHP Forum Software 7.6.3
(Snapshot build 20180915.dev)
Page Time: 0.034s Queries: 15 (0.012s) Memory: 3.2479 MB (Peak: 3.6719 MB) Zlib enabled. Server Time: 2018-09-21 19:18:04 UTC