In MySQL 5.1 you have EVENTs ...basically this is like a cron job, but inside the database:
http://dev.mysql.com/doc/refman/5.1/en/events.html
You can set one up and let it run, well, as often as you need to do the update.
something like:
delimiter //
CREATE EVENT update_inactive_teams
ON SCHEDULE EVERY 1 DAY
ON COMPLETION PRESERVE
ENABLE
DO
UPDATE teams
SET inactive = 1
WHERE now() - 14 DAY > (
SELECT MAX(event_date)
FROM events e
WHERE e.team_id = teams.id
)
//
delimiter ;
You may need t configure the server to enable events:
http://dev.mysql.com/doc/refman/5.1/en/events-configuration.html
SET GLOBAL event_scheduler = ON;
Unfortunately, you need the SUPER privilege to enable it:
http://dev.mysql.com/doc/refman/5.1/en/events-privileges.html