mysql+
Memcache & MySQL PHP Session Handler
LAST UPDATED MAY 17, 2009
I have recently read Cal Henderson’s book, Building Scalable Web Sites, and was inspired 6 ways from Sunday on just about every approach I take to web development. I highly recommend you purchase this book, and read through it asap… it is a must read [even though it was published back [...]
Using Memcache with MySQL and PHP
Memcache is a great caching tool available for nearly every scripting or programming environment. I use it with PHP to speed up some applications I have written by completely avoiding asking the database for information. I wanted a very clean way of implementing this in my various projects, with as little change to the existing [...]
Read Full Post | Make a Comment ( 30 so far )Use one DB connection on your custom wordpress install
Like most people who use WordPress, I have hacked a few installs 6 ways from Sunday for some of my projects. While digging through my hacks I had noticed that the script was connecting to my database TWICE per client … once for my website it’s self, then once for WordPress’ needs. This seemed like [...]
Read Full Post | Make a Comment ( 2 so far )Make your website completely UTF-8 friendly
LAST UPDATED JUNE 15, 2009
Running an Internationalization / Localization [or i18n / L10n] friendly website can be tricky, and sometimes downright maddening for those who haven’t yet delved into the world of Unicode. Allowing your users to post in whichever language and / or characters of their choice to your site is crucial for any [...]
Never use ORDER BY RAND() again!
I have been guilty of using ORDER BY RAND() in MySQL queries to return random records from time to time, but everyone knows to avoid it like the plague. For those who agree with me, aside from using it on very small tables [1 - 500 records], I have an elegant workaround using PHP.
<?php
[...]