Tag Archives: data

[Drupal] Deleting node content of a certain type in bulk

On occasions you may need to bulk delete all nodes of a certain type.
The following code requires 2 variables, the amount of rows to delete each time and the content type.

$amount = 100;
$type = ‘node_type’;
$result = db_query("SELECT nid FROM {node} WHERE type = ‘%s’ LIMIT %d", $type, $amount);
if (db_num_rows($result) && user_access(’administer nodes’)) {
$n [...]

[PHP + MySQL] Making a basic product database – Part 1

Firstly you need a server which supports PHP and Mysql. If you haven’t got one, you can set up your computer as a local web server. If you are on Windows, you can follow this guide to help you Set up your PC as a test environment using Apache, PHP and MySQL.
Create the database and [...]

[Drupal] Get a list of other nodes that are related by taxonomy terms

Building on this snippet from Drupal to get related node items sharing the same taxonomy terms for 4.7, I have made it work for multiple terms.  This snippet is for Drupal 5 and has been tested to work on 5.10.
The code will return a list view of 5 (changeable with $num_nodes) in an unordered list [...]

UK Counties & Countries data files (CSV + MySQL)

The following files are data files that can be used in projects that require a list of UK Counties and/or all of the Countries in the world.
The following files are useful for web developers to use for their select drop downs or a lookup table in a database.

[MySQL] Using MySQL to analyze web usage from Windows ISA logs

This tutorial will teach you how to import a tab delimited file in to a MySQL database. I built a program to do this for Windows ISA Server logs which contained over 500,000 lines which was way too many for Microsoft Excel to handle and too much for notepad to handle properly. What MySQL functions [...]

Grand Theft Auto IV – Already hit some UK shelves

An Asda store in the UK has started to sell GTA IV before it’s release data according to a post on Qj.net.  The game has now been taken off the shelves and the incident put down to an error.
Keep an eye out at stores for a prereleased copy.

Unreal Tournament 3 – Preview

I finally received my copy of Unreal Tournament 3 today from Play.com after waiting years for it’s release. And I must say I am impressed, more than I thought I would be.