Total Rows In MySQL Query ‘Trick’

Background: I wrote this post last week, after discovering what I thought was a nifty trick. Shortly afterwards, I found contradicting evidence that suggested the traditional route of using a separate query of COUNT(*) was faster, and/or it depends on your individual database design. Instead of deleting the post, I figured I should publish it… read full entry »


British VAT Change Affecting Online Retailers

I don’t know if you will have all heard (given that most of my readers are hailing from the USA) but the UK government has reduced VAT — the tax we pay on many goods and services — from 17.5% to 15% effective as of Monday 1st December. While this is barely going to scrape… read full entry »

Adding a FanUpdate Entry Word Count

This is a rough 30-second guide, code is short & sweet, and I’ve not run the mod past Jenny… but, I’m not one to refuse a request when it’s simple to implement. In your fanupdate folder (or the root of your website if that’s where you’ve got it installed), open the class folder, and find… read full entry »

PHP Includes Aren’t What You Think

Newsflash: knowing how to do implement PHP include() doesn’t mean you “know” PHP, sorry and all that. Yes indeed, I hate to be the bearer of bad news, but this cool “layout technique” you’ve learned isn’t a layout technique at all. It has nothing to do with layouts. In fact, PHP and design are two… read full entry »

I Passed My JavaScript Module

I finally remembered to check the results for the second module of my course today; I received another Grade 2 pass as per the first module. Given my self-confessed loathing of JavaScript I didn’t even expect to get that far. I am annoyed though, to be quite honest. I have a weak spot when it… read full entry »

Beginner’s Guide to PHP – Part Five

Back in Part Four of the Beginner’s Guide to PHP, we covered the basics of arrays, and the foreach construct which is used to iterate over arrays. Today, you get to learn about for(), woot for you. According to the PHP manual, for() loops are the most complex in PHP, so I’m hoping I can… read full entry »


Pants: Digital Sugar Designs

When you tell the world that you have “7 years of experience in the field“, it helps if you show that so-called experience off. And no, blurring a few dodgy photographs so that the subject looks like they’re being melted under a 500W halogen lamp does not count as experience in the field. Only in… read full entry »

Improved Related Posts in Sidebar

If you checked out the comments on yesterday’s post — WordPress Related Posts in Sidebar — you’d have noticed that the “related” posts code I use was flawed. Namely, it didn’t exclude the post you were on, so the chances were that only 4 out of 5 would be things you hadn’t already read. Anyway,… read full entry »


WordPress Related Posts in Sidebar

Several of you keep pestering me on how I do my ‘related posts’ thing in the sidebar. You’re nosy buggers, I’ll give you that. Anyway, here comes the confession part: they’re not really “related” posts at all. In fact, the only thing that they each have in common is that they’re in the same category…. read full entry »

Handy OO PHP Hint

Sticking a few functions (aka methods) inside “class Something { }” does not make your code object oriented. Learn the fucking principles before you try and educate other people, dickweed. I’m looking at you here.