Category Archives: MySQL

Magento: Modify Collection To Include Comma Separated Values From Another Table

It was rather difficult to come up with a title for this post, so I’m not sure that it is completely accurate. But, I have been working on a module, and I needed to modify the catalog/product collection to add … Continue reading

Posted in Magento, MySQL | 1 Comment

Magento: Mass Exclude/Unexclude Images

By default, Magento will check the ‘Exclude’ box for you on all imported images, making them not show up as a thumbnail under the main product image on the product view. Should you ever want to mass unexclude them (or … Continue reading

Posted in Magento, MySQL | 6 Comments

Mysql: Duplicate a Database

I needed to duplicate one of my mysql magento databases today. Instead of dumping it to my computer, then sending it back into a different database, I figured there’s got to be a more efficient way to do it. Fortunately … Continue reading

Posted in MySQL | Leave a comment

Magento Install: Mysql Error – SQLSTATE[HY000] [2002] No such file or directory

I recently changed up the configuration of my Mac (running 10.6.4) and I was installing a fresh copy of Magento (1.4.1.1) when I ran into the following error when I got to the database credentials: SQLSTATE[HY000] [2002] No such file … Continue reading

Posted in Magento, MySQL, PHP | 14 Comments

Magento: SQL to Find Missing Images

I just imported a ton of products for new website that I’m working on, and it turns out that the client misnamed a bunch of images, causing Magento to ignore the image import for those ones. I don’t want to … Continue reading

Posted in Magento, MySQL | 5 Comments

Mysql: USING BTREE – Error when dumping from 5.1 and importing to 5.0

I was dumping a database today to put onto a different server. I am currently running 5.1.45 locally, and the server I am moving to has 5.0.58. When trying to import the database to the new server, I was getting … Continue reading

Posted in MySQL | 21 Comments

MySQL & PHP: Convert Strings From All Uppercase to Uppercase Only First Letter of Each Word

I’m not sure if it is possible to make that title much shorter than that… Anyway, I had some old data that I imported to an installation of Magento. All of the product titles were all uppercase, which was quite … Continue reading

Posted in MySQL, PHP | Leave a comment

Magento: Easily and Quickly Delete All Products

If you have ever tried to delete a large amount of products out of Magento, you’ll realize that it takes forever, and in many cases, you have to do it in small quantities at a time otherwise it will freeze … Continue reading

Posted in Magento, MySQL | 16 Comments

Mysqli and Object-Oriented PHP

Sometimes it is easy for me to get stuck doing things the way I know how to do it, rather than finding a better, more up-to-date method. I just had a recent post about making multiple connections to mysql, but … Continue reading

Posted in MySQL, PHP | Leave a comment

Turn Off Word Wrap in Leopard Terminal

As I said in the post prior to this, I have really been enjoying using Terminal for accessing MySQL databases. I found a problem with it though. If you have a table with a lot of columns, or a column … Continue reading

Posted in Mac OS X, MySQL | 1 Comment