-
mysql innoDb perfomance tips
-
:
If you need to change the character set and collation for all columns and tables on an entire database then check out this little PHP script.
It’s currently Zend Framework based, though only for the database adapter – you could easily modify this to suit your own database connection.
<?php /* collationChange * Edmonds Commerce * www.edmondscommerce.co.uk * info@edmondscommerce.co.uk * 0844 357 0201 * * Description: * * Bulk Change the Collation and Character Set for an Entire Database * * Inspiration Came from Here: * http://serverfault.com/questions/65043/alter-charset-and-collation-in-all-columns-in-all-tables-in-mysql * */ //get Db connection etc require('../_top.php'); $db = Zend_Registry::get('dbAdapter'); $dbName='SET_THE_DB_NAME'; $character_set = 'utf8'; $collation = 'utf8_general_ci'; $stmt = $db->query("SELECT distinct CONCAT( 'alter table ', TABLE_SCHEMA, '.', TABLE_NAME, ' CONVERT TO CHARACTER SET $character_set COLLATE $collation;' ) as query, TABLE_NAME as t FROM information_schema.COLUMNS WHERE TABLE_SCHEMA = '$dbName';"); while($r=$stmt->fetch()){ $db->query($r['query']); echo "<h3>Done {$r['t']}</h3>"; }
Another tasteful Magento work we did was this project specializing in selling products for pets. Other than consultation we installed this nice and simple Magento theme and set up a WordPress blog for the client.
We ensured that the WordPress blog and the store run seamlessly and that the two websites persist the same feel and look as closely as possible.
Upholstered Headboards.co.uk specialises in manufacturing, supplying and distributing quality designer upholstered headboards to both the commercial and domestic markets.
We built this project from ground up. The website is based on Magento e-commerce platform.
We implemented design for this website from PSD files sent to us by the client’s designer. The implementation was quite fun as we had to utilize a variety of tools to get everything absolutely perfect.
The website supports multiple store (two at the moment with a view of increasing it to 5) with a single checkout. To get the both stores to channel all checkout transactions to one secure checkout URL was a bit of fun. We were forced to think out of the box to come up with a concrete and stable solution as Magento didn’t support the requirements quite well.
We also implemented some nice custom select options to simply usability. Below is an example of a
pop up select box displaying fabric options for user to select from.
Baildon Physiotherapy is a sports injury clinic based in Baildon, bradford leeds. They offer expert treatment of a wide variety of musculoskeletal problems.
We have created their new look website from ground up based on client’s specification. The website is based on WordPress. We had to customize the look and feel so the website appears as a standard CMS website while utilizing the power of WordPress blog alongside.
Another cool feature we did for this project was to successfully integrate the booking sytem and a contact form. When clients make an appointment as shown on the figure below, the site administrator will automatically be notified as well as the record will appear on the pending list on the booking system in the back-end. The feature was critical for this project.
Swimmers ltd specializes in offering the largest range of waterproof MP3 players and cases available in one store. They aim to be a trusted authority on selecting audio products and cases for use during water sports activities. They offer products such as Waterproof MP3 Players, Waterproof iPod Cases, Waterproof Headphones, Waterproof Phone Cases and Waterproof Radios.
We have worked from ground up for this project. The website is based on Magento. We received the design instructions as a word document. We then used a lot of imagination to try and come up with something that has a look and feel as the client would have wanted. Though it was a tough act, we managed to match expectations.
The client was also very keen to ensure his SEO work is still top of the range. We therefore had to do a lot of work behind the screen (code wise) to ensure that the website is as SEO friendly as it can possibly be.
Some of the work we have done is to rewrite the catalogue block to list products on the mouse over on categories on the top menu (please see the diagram below). This is practical for small stores and ensures your products are indexed on each page request on your website.
The array_walk function is one of those unassuming little PHP functions that a lot of people may well ignore, but it is often very useful and can save writing out lines of code, compressing a pretty common coding structure into a single function call. Of course that also means that it is fast!
However, the standard documentation doesn’t make it clear if you can use array_walk on an array and use a class method as the callback rather than a global function. You can and here is how to do it:
$object = new MyClass; $array = array(/* some array */); array_walk($array, array($object, 'methodName'));
If you are using netbeans for PHP classes and you have some of your class properties are instances of other objects and you want to get autocomplete working for them, then you might struggle to figure out which PHPDoc syntax to use to get autocomplete working.
Here is the answer:
/**
* @property MyObject $myObject
* @property AnotherObject $anotherObject
*/
class MyClass{
protected $myObject;
protected $anotherObject;
public function __construct($myObject, $anotherObject){
$this->myObject=$myObject;
$this->anotherObject=$anotherObject;
}
public function autocomplete(){
$this->myObject->//autocomplete works here
}
}






