OK I assumed it would be the PHP error log, but there is this in the Apache error log:
PHP Question2Answer MySQL query error 1452: Cannot add or update a child row: a foreign key constraint fails (`pokemondb`.`qa_userevents`, CONSTRAINT `qa_userevents_ibfk_1` FOREIGN KEY (`userid`) REFERENCES `qa_users` (`userid`) ON DELETE CASCADE) - Query: INSERT INTO qa_userevents (userid, entitytype, entityid, questionid, lastpostid, updatetype, lastuserid, updated) VALUES ('87', '-', 0, 249, 2960, NULL, '229', FROM_UNIXTIME(1278214178)), referer: mysite/pokebase/admin/stats
BTW I ran the script on my "meta" site with no problems. Is this another "legacy" problem, from the Q2A database structure changing over the versions?