user_watch ); $bits = array(); foreach( $list as $title ) { if( $id = $lc->addLink( $title ) and ! $bits[$id]++) { $sql .= ($i++ ? "," : "") . "({$row->user_id},{$id})"; } } if( ($n++ % 100) == 0 ) echo "$n of $nu users done...\n"; } echo "$n users done.\n"; if( $i ) { wfQuery( $sql, DB_MASTER ); } # Add index # is this necessary? $sql = "ALTER TABLE watchlist ADD INDEX wl_user (wl_user), ADD INDEX wl_page (wl_page)"; #wfQuery( $sql, DB_MASTER ); ?>