php forum
php mysql forum
php mysql smarty
 
Topic Options
#285452 - 05/30/05 03:44 PM Updating a table without emptying it first
Musicarl Offline
Lurker

Registered: 05/05/05
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.<br /><br />Our tech people think the table was receiving queries and since there was nothing in it, some nasty loop situation occurred. <br /><br />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.

Top
#285453 - 05/30/05 04:08 PM Re: Updating a table without emptying it first [Re: bigjoeyc]
Anno Offline
Code Monkey

Registered: 05/23/01
Posts: 562
Loc: Austria
Did you drop it or only delete the content?<br /><br />To delete the table content: DELETE FROM "tablename"<br /><br />Then insert whatever you wish to insert.<br /><br />To insert data into a table that already contains potentially the same data:<br /><br />REPLACE INTO "tablename"

Top
#285454 - 05/31/05 05:17 PM Re: Updating a table without emptying it first [Re: domain123]
Musicarl Offline
Lurker

Registered: 05/05/05
Posts: 4
That little checkbox allowing me to overwrite the data did the trick. Thanks for your help.

Top



Latest Posts
[7.2.1] - Naked shoutbox
by bellaonline
05/05/12 05:00 PM
[7.x] Stop Forum Spam Integration v0.4
by bellaonline
05/05/12 03:53 PM
Shout Box

(Views)Popular Topics
Known public proxy servers 1689885
Integrated Index Page (IIP) 5.3.1 555705
Finished-[6.5.2] Games Arcade Deluxe v1.9 501236
Integrated Index Page (IIP) 5.1.1 415112
TLD Bv2.1 Released - Threads Links Directory 396822
[6.0x] Who's Online 4.0.0 [Finished] 389412
Finished-[6.5.1] Integrated Index Page (IIP) 6.5 330423
Q & A 298663
Slash UBB 266936
[6.3.x] [beta] Hit Hack 2.0 227970
Forum Stats
13621 Members
59 Forums
37191 Topics
295716 Posts

Max Online: 686 @ 06/28/07 07:04 AM

 

 

 
fusionbb message board php hacks