I'd like to show the date when an event was last updated.

I've got 1 page that includes 3 different content blocks, each containing its own category. The content blocks are all events. Each time an event is updated or added, I'd like to display the last update date on the bottom of the page.

Based on previous posts, I'm starting with this, but I'm fairly new to PHP and Drupal and need a little help.

<?php
function last_update ($format = 'g:i a') {

$query = "SELECT max(timestamp) as lastUpdate
FROM node_revisions WHERE (nid =3 OR nid =4 OR nid =5)";

$result = mysql_query($query) or die;

 return date($format, $timestamp);
}
?>

THANKS!