Magento Batch Update Product Type in MySQL

I just want to share a simple MySQL snippet to batch update product type in Magento. This is a pretty basic SQL query, and I’ll just save it here in my blog so that I can remember what I did to update product types by batch.

I just went to my SQL database via phpmyadmin, click the SQL tab, and run this command:
UPDATE prefix_catalog_product_entity
SET type_id = REPLACE(type_id, 'simple', 'virtual')

If you’re using a custom table prefix, replace prefix with your prefix. Otherwise, just use catalog_product_entity.

This is what I did to change all my product types from simple to virtual. It’s quick and easy and I was able to change it all in 1 second.

Geekery Internet

Delete WordPress Comments based on IP Range

First of all. Happy new year everyone! This is my first post for the year 2014, and I would like to share a useful MySQL snippet wherein you can delete a series of comments based from an author’s IP. We all know for a fact that akismet can’t block all spam comments. My blog itself has a lot of spam comments lately, and I’ve been having a hard time delete it one by one.