protected function counter2() {
    if($this->nodb) {
      return;
    }

    $this->query("select count(*) from information_schema.tables " .
                 "where (table_schema = '$this->masterdb') ".
                 "and (table_name = 'counter2')");

    list($ok) = $this->fetchrow('num');

    if($ok) {
      if($this->isBot) {
        // BLP 2017-11-01 -- add left to keep from getting too long errors
        $sql = "insert into $this->masterdb.counter2 (site, date, filename, count, bots, lasttime) ".
               "values('$this->siteName', now(), left('$this->requestUri', 254), 0, 1, now()) ".
               "on duplicate key update bots=bots+1, lasttime=now()";
      } else {
        $member = 0;
        $memberUpdate = '';

        if($this->id) {
          $member = 1;
          $memberUpdate = ", members=members+1";
        }
        // BLP 2017-11-01 -- add left to keep from getting too long errors
        $sql = "insert into $this->masterdb.counter2 (site, date, filename, count, members, lasttime) ".
               "values('$this->siteName', now(), left('$this->requestUri', 254), 1, $member, now()) ".
               "on duplicate key update count=count+1$memberUpdate, lasttime=now()";
      }
      $this->query($sql);
    } else {
      $this->debug("$this->siteName: $this->self: table bots does not exist in the $this->masterdb database");
    }
  }