Mastodon
Baobab: PHP/MySQL Library For The Nested Set Model

Baobab: PHP/MySQL Library For The Nested Set Model

Introduction When working with databases, you may want a table structure which allows your record to have a parent record (heirachical recordset).  In simple scenarios it’s easy enough to simply have a parent_id column. However, for displaying the entire tree...

HOW TO: Disable Deprecated Function Notices in PHP

Here’s a quick tip on how to disable notices like this one appearing on your site: Deprecated: Function eregi() is deprecated in… At the top of your application (bootstrap or index file) just add the following line of PHP: error_reporting(E_ALL &...

HOW TO: Catch PHP Errors and Warnings

This morning I was faced with an issue with SwiftMailer where the PHP code was throwing an error message as it failed to connect with the mail server. To solve it I first thought of using a try/catch, but obviously that wouldn’t work due to the fact that the...