Archive for the ‘Tutorials’ Category

MySQL UPDATE with INNER JOIN and Subquery Optimisation

Posted on January 10th, 2012 by admin
Filed under MySQL | No Comments

Recently working on a project I discovered and learnt something new so I thought I would share it amongst everyone.

Remove WordPress tags from header

Posted on August 2nd, 2011 by admin
Filed under Wordpress | No Comments

Within the Wordpress head tags it can be quite messy. So here is some code to get rid of unwanted tags within the HTML tag.

How to compare two dates in php

Posted on December 6th, 2009 by admin
Filed under PHP, Tutorials | No Comments

Now that we know how to convert a formatted date in PHP to timestamp. Let’s move on to compare two dates. At my workplace I came across and instance where I had to check the posted date wasn’t less than today’s date, so let’s put this in picture so you know the concept behind date [...]

How to convert a date into a timestamp

Posted on December 5th, 2009 by admin
Filed under PHP, Tutorials | 1 Comment

Whether you are posting a date or a passing variable that is a formatted date you can use the function below to convert it into a timestamp function convert_timestamp($delimeter,$date){ $explode_date = explode($delimeter,$date); $new_date = mktime(0,0,0,$explode_date[1],$explode_date[0],$explode_date[2]); return $new_date; } Now to test the function we have created is shown below. $date = “01/12/2009″; $delimeter = “/”; [...]