Backup MySQL Database PHP Script

Wednesday, August 12, 2009 - 10:10

There are quite a few scripts available on the Internet that allow you to dump data from a database into a format that can be used to replicate that database structure elsewhere. The following function is my take on this commonly occurring script.


Finding Missing Values In A MySQL Table

Friday, September 19, 2008 - 09:42

If you have a table of incremental values it can be hard to find out which ones are missing. The only solution might be to write a script to get all the data from the database and see which ones are missing. However, there is a way of doing this without using a script.

Using a standard select query like this:


Enable Custom Field Searching With Wordpress 2.6

Friday, September 5, 2008 - 13:52

I have previously talked about enable custom field search in Wordpress, but that involved altering the main Wordpress files, which is a big no-no.

So is there an alternative? Well, yes, otherwise I wouldn't have bothered writing the post! To enable custom field (also called Wordpress metadata) searching you need to set up two things.

First you need to have created a custom field (or two) and added this to a number of posts.


Finding The Latest Timestamp Value From A Set Of Values In MySQL

Thursday, March 20, 2008 - 13:41

Storing sets of data with a timestamp is common practice, especially if you want to keep a history of the values that have been stored previously. Lets say you wanted to store a piece of information about two variables, each of which can have a history. Here is an example dataset.


Downloading Alexa Data With PHP

Wednesday, January 23, 2008 - 11:01

It is widely known that the data that Alexa offers on visitor numbers is far from accurate, but it is possible to obtain an XML feed from Alexa that allows you to find out all of the data that Alexa offers, which is more than just their visitor numbers. Passing the correct parameters to this feed you can find out related links, contact and domain information, the Alexa rank, associated keywords and Dmoz listings.

As an example here is a feed URL for getting information about the page.