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


Who's Online
0 registered (), 23 Guests and 12 Spiders online.
Key: Admin, Global Mod, Mod
Shout Box

Latest Posts
Wisdom needed
by Gizmo
Today at 10:54 AM
How to hide sub forums from summary page
by blaaskaak
Yesterday at 09:54 AM
Spell Check [beta]
by Bill B
12/01/08 09:16 PM
PhotoPost BB Code Popup
by AllenAyres
12/01/08 09:41 AM
Problems reading a lot of old posts here
by AllenAyres
12/01/08 09:35 AM
Forum 'Trader Ratings'.
by AllenAyres
12/01/08 09:33 AM
Customization needed
by Gizmo
11/12/08 12:28 PM
New Mods
User Authentication Class
by
01/19/07 02:59 PM
Multiple Identity Detector
by
12/30/06 06:39 PM
PhotoPost BB Code Popup
by
11/06/06 05:43 PM
Spell Check [beta]
by
10/17/06 09:24 PM
Newest Members
Truth, David DelMonte, nick1, Begbie, cenk
13364 Registered Users
Top Posters
AllenAyres 25452
JoshPet 11330
Rick 8372
LK 7396
Lord Dexter 6503
Greg Hard 5533
Charles Capps 5438

 

 

 
fusionbb message board php hacks