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


Top Posters Last 30 Days
AllenAyres 83
Gizmo 29
sirdude 25
Zarzal 22
blaaskaak 13
willing 7
swebs 6
Who's Online
1 Registered (sirdude), 42 Guests and 7 Spiders online.
Key: Admin, Global Mod, Mod
Shout Box

Latest Posts
Nice Ajax Chat
by sirdude
22 minutes 15 seconds ago
[7.x] UBB.Post Templates v0.1
by sirdude
Today at 12:48 PM
Team UBBDev Rides Again!
by AllenAyres
Yesterday at 10:56 PM
[7.3.x] ubb.links
by AllenAyres
07/03/08 06:15 PM
Changing currency for subscriptions?
by AllenAyres
07/03/08 01:15 PM
Protect users emails
by AllenAyres
07/03/08 11:36 AM
VPS and Newbies
by Gizmo
07/02/08 09:08 PM
New Mods
Protect users emails
by Basil Fawlty
06/29/08 08:44 AM
[7.3.x] Scheduled board close for backup
by blaaskaak
06/26/08 04:01 AM
[7.3+] CustomTag - Audo Embedding
by Gizmo
06/24/08 07:52 PM
[7.3.x] ubb.links
by AllenAyres
06/20/08 11:50 PM
[7.3] Dissallow quotes more then 3 levels deep
by blaaskaak
06/09/08 09:01 AM
Newest Members
ryzilla, M4D, Jer, Kanigo2, Bubba
13302 Registered Users

 

 

 
fusionbb message board php hacks