1048576.com 2 to the 10th, squared!

16Apr/10Off

MySQL tip: UPDATE LIMIT 1

Here's one I picked this up a while ago, for those that rock mysql at the command line all day like I do:

master/wp> UPDATE user SET ad_id='fb' WHERE user_id = 1337 LIMIT 1;

It's a good way to ensure that if you seriously fcuk the query up, you only update 1 record. For multiple records, there's another good practice to get used to: do a SELECT first, using the same exact WHERE criteria you plan to use in your UPDATE statement. This verifies the set you will be affecting when you do run the UPDATE is indeed what you want to update, and you can plug the row count you get from it into your UPDATE's LIMIT clause.

31Dec/09Off

Help save MySQL!

Monty, the creator of MySQL, sent out an email today in which he asks people in the community to sign the petition to help save the open source MySQL database. Check out his latest blog post, Help keep the Internet free [monty-says.blogspot.com], for more insights on the Sun-Oracle deal.

Visit helpmysql.org for more information and sign the petition if you agree with Monty that "if Oracle buys MySQL as part of Sun, database customers will pay the bill."

Tagged as: , , 2 Comments