homepage Welcome to WebmasterWorld Guest from 54.227.67.175
register, free tools, login, search, subscribe, help, library, announcements, recent posts, open posts,
Subscribe to WebmasterWorld
Visit PubCon.com
Home / Forums Index / Code, Content, and Presentation / Databases
Forum Library, Charter, Moderators: physics

Databases Forum

    
hit execute too soon.
I HATE when that happens!
LifeinAsia




msg:4516084
 11:19 pm on Nov 5, 2012 (gmt 0)

I always hate it when I click the execute button when doing an UPDATE (or DELETE) statement before typing the WHERE conditional.

Now restoring the backups... :)

 

GaryK




msg:4516086
 11:30 pm on Nov 5, 2012 (gmt 0)

Don't feel too bad about it as I'm sure most of us have done that at least once. I know I have.

brotherhood of LAN




msg:4516088
 11:36 pm on Nov 5, 2012 (gmt 0)

Yeah, I read somewhere that a typist makes an error on average about 360 characters. Surely the same must be the case for DB operations...

I've mucked up bad a few times but nothing that was ever permanent, but took time to remedy.

LifeinAsia




msg:4516093
 12:02 am on Nov 6, 2012 (gmt 0)

Yup- just a friendly reminder to everyone of the importance of timely backups. And especially backups that you can actually restore.

wheel




msg:4516098
 12:06 am on Nov 6, 2012 (gmt 0)

rm -Rf *

Done as root at the top of my webserver.

shutdown -h now

Shutting down my desktop from a terminal. Except the PC didn't shutdown. Stared stupidly as I realized...crap. I just remotely shut down my webserver. Two fixes to that. First, I thankfully had a KVM IP switch on my webserver so I cycled the power and restarted it IIRC. Secondly, put everything except the PC (screen, printer, etc) on it's own power bar and now I just hit the power bar at the end of the night - turns off everything except the box.

Dijkgraaf




msg:4516116
 1:45 am on Nov 6, 2012 (gmt 0)

Usually when I'm about to do an UPDATE or DELETE I first write it as a SELECT statement and verify that only the rows I'm about to delete or UPDATE are selected.

whoisgregg




msg:4517175
 1:52 pm on Nov 8, 2012 (gmt 0)

Usually when I'm about to do an UPDATE or DELETE I first write it as a SELECT statement and verify that only the rows I'm about to delete or UPDATE are selected.


Same here -- it's a good habit to get into.

LifeinAsia




msg:4517225
 5:20 pm on Nov 8, 2012 (gmt 0)

Yup- I usually do that too. The one time I don't do it...

topr8




msg:4517330
 11:19 pm on Nov 8, 2012 (gmt 0)

luckily i don't use the console i use MySQL workbench to do DB stuff and it won't allow a DELETE without a where clause, it gives an error. not for update though

Bewenched




msg:4517447
 7:34 am on Nov 9, 2012 (gmt 0)

Don't feel bad, just last week I was trying to clean up double spaces and in the replace forgot to put a single space to replace it with and it wiped all the spaces from our product names... Lol.. yea thank goodness for backups.

Global Options:
 top home search open messages active posts  
 

Home / Forums Index / Code, Content, and Presentation / Databases
rss feed

All trademarks and copyrights held by respective owners. Member comments are owned by the poster.
Home ¦ Free Tools ¦ Terms of Service ¦ Privacy Policy ¦ Report Problem ¦ About ¦ Library ¦ Newsletter
WebmasterWorld is a Developer Shed Community owned by Jim Boykin.
© Webmaster World 1996-2014 all rights reserved