Subscribe To RSS Feed


Mike D's SharpBlog

Just another Sharpdot weblog

Archive for November, 2008

Find and Replace in a MYSQL Database

- Friday, November 21st, 2008 -

If you have ever tried to move a Site to a new domain or server then you have probably had to dig through the database and change any instances of the old domain name to the new one. THe following sql will help you do a find and replace in the database. This is great for moving a developement site to production. Any way here it is.

UPDATE <tableName> SET <columnName> = replace(<columnName>, 'http://www.old-domain.com','http://www.new-domain.com');

Modify this to your needs.

Tags: ,
Posted in Sql | No Comments »

PHP extension Errors, pdo_mysql.dll

- Monday, November 17th, 2008 -

I had a problem getting the pdo_mysql extension to work properly.  I figured out that inorder to use extensions beginning with pdo you need to also have php_pdo.dll in the extensions as well. The php_pdo.dll extension must also be added to the php.ini file before any of the other extensions with pdo in the name. Hope This helps anyone else who might be stuck.

Posted in PHP | No Comments »

Adding Lightbox to Magento

- Saturday, November 15th, 2008 -

If you want to add Lightbox to a Magento Install, begin with the following instructions (  http://www.magentocommerce.com/wiki/adding_lightbox_to_magento_v2 ).

I was using the modern theme and had to modify the instructions as follows:

Go to /js/

Create a directory: /lightbox

and copy the lightbox.js file to this directory

The “/js/” directory is the top most “JS”directory of the magento install. It did not work if you put the lightbox.js file in the /skin/frontend/default/default/js/ or /skin/frontend/{your}/{path}/js/lightbox

Tags: ,
Posted in magento | No Comments »