Published on July 15th, 2010 by Hypn. Filed under MySQL, PHP, programming | No Comments
I’ve just gotten word from the creators that USB Webserver 8 is out – long time readers might remember that I released an unofficial hacked up version a little while ago, you should definitely use this official version instead.

This release contains:
- Php 5.2.13
- Apache 2.2.15
- PhpMyAdmin 3.3.1-rc1
- MySQL 5.1.44
Published on May 17th, 2009 by Hypn. Filed under MySQL, PHP, programming | No Comments
UPDATE (15 July 2010): An “official” version of USB Webserver 8 has been released, please use this instead of my “unofficial” version. You can download it from http://www.usbwebserver.net/
This is an unofficial updated version of USB Webserver. The original USB Webserver was created by http://www.usbwebserver.nl – but their site is currently down, and they haven’t released an update for a while.
This version contains:
Apache: 2.2.11
PHP: 5.2.10-dev (with GD and cURL)
MySQL: 5.1.30-community (with InnoDB)
It defaults to “English” (the original was “Dutch”), and you may need to change the ports if you have been using USB Webserver previously.
Download: “USB Webserver 8.0 (unofficial).zip” (17.6mb)
(and yes, I know the main USB Webserver screen still says “USB Webserver 7.0″ – ignore that :P)
Published on September 22nd, 2008 by Hypn. Filed under MySQL | No Comments
I used to be dead against things like triggers… mainly because I hated coding them (and SQL) back when I learnt Oracle PL/SQL at college, and I’ve always been a “bare-minimum, must-be-backward-compatible, code-it-yourself” programmer… but now I’ve decided it’s just much easier to use them, and it’s not my fault if people refuse to upgrade to MySQL 5.
So here’s my niffty trigger code for the day, which automatically updates the “last_updated” (timestamp) field in a table, when a record is inserted or updated:
CREATE TRIGGER `database_name`.`last_updated_insert_trigger`
BEFORE INSERT ON `database_name`.`table_name` FOR EACH ROW SET new.last_updated := UNIX_TIMESTAMP();
CREATE TRIGGER `database_name`.`last_updated_update_trigger`
BEFORE UPDATE ON `database_name`.`table_name` FOR EACH ROW SET new.last_updated := UNIX_TIMESTAMP();
There’s probably a better way to do this (and I think you can combine both triggers, using “OR BEFORE UPDATE”?) but this is the first I’ve worked with triggers in MySQL and I’m too lazy to fiddle. Hope it helps. As I’m sure you can guess, `database_name` is your database name, `last_updated_update_trigger` is the name of your trigger, `table_name` is your table name, and `last_updated` is your field name that will contain the timestamp.