beginTransaction(); foreach( getAffectedIds('eids') as $markEid ) { dbQuery('UPDATE Events SET Archived=? WHERE Id=?', array(1, $markEid)); } $dbConn->commit(); $refreshParent = true; } else if ( $action == 'unarchive' ) { $dbConn->beginTransaction(); foreach( getAffectedIds('eids') as $markEid ) { dbQuery('UPDATE Events SET Archived=? WHERE Id=?', array(0, $markEid)); } $dbConn->commit(); $refreshParent = true; } else if ( $action == 'delete' ) { $dbConn->beginTransaction(); foreach ( getAffectedIds('eids') as $markEid ) { deleteEvent($markEid); } $dbConn->commit(); $refreshParent = true; } ?>