My ugliest SQL query — for posterity.
SELECT `wp_category`.`id` AS `category:id`, `wp_category`.`name` AS `category:name`, `wp_category`.`created` AS `category:created`, `wp_category`.`modified` AS `category:modified`, `wp_lib_items`.* FROM `wp_lib_items` LEFT OUTER JOIN `wp_lib_borrowers` ON (`wp_lib_items`.`id` = (SELECT `wp_b`.`id` FROM `wp_lib_borrowers` AS `wp_b` WHERE `wp_b`.`item_id` = wp_lib_items.id ORDER BY `wp_b`.`status` ASC LIMIT 1)) LEFT OUTER JOIN `wp_congregate_members` ON (`wp_lib_borrowers`.`member_id` = `wp_congregate_members`.`id`) LEFT JOIN `wp_lib_categories` AS `wp_category` ON (`wp_category`.`id` = `wp_lib_items`.`category_id`) ORDER BY IFNULL(NULLIF(`wp_lib_borrowers`.`due_date`, '0000-00-00'), '3333-33-33') DESC, `wp_lib_items`.`title` ASC LIMIT 10 OFFSET 0
Now I’m off to tango with PHP’s SplPriorityQueue.
A website I created for a local restaurant. My favorite part is the shopping cart functionality.
I first started working on this in 2009 using WordPress as a base with a CodeIgniter backend. In early 2009 it became necessary to completely rewrite it because it wasn’t very extensible and there were a lot of bugs and duplicate code.
By doing this, every update affects all the sites. In cases where custom functionality is needed for a client, we simply override with Kohana’s cascading file system.
I’ve learned more on this than on any other project before or after.
Design: DP Media Group.
Please visit the link above for a full list of features.