original_string: public function executeLog(string $queries): int
    {
      // Counter for the number of rows written/logged.
      $n = 0;
  
      $this->multiQuery($queries);
      do
      {
        $result = $this->mysqli->store_result();
        if ($this->mysqli->errno) $this->mySqlError('mysqli::store_result');
        if ($result)
        {
          $fields = $result->fetch_fields();
          while (($row = $result->fetch_row()))
          {
            $line = '';
            foreach ($row as $i => $field)
            {
              if ($i>0) $line .= ' ';
              $line .= str_pad((string)$field, $fields[$i]->max_length);
            }
            echo date('Y-m-d H:i:s'), ' ', $line, "\n";
            $n++;
          }
          $result->free();
        }
  
        $continue = $this->mysqli->more_results();
        if ($continue)
        {
          $tmp = $this->mysqli->next_result();
          if ($tmp===false) $this->mySqlError('mysqli::next_result');
        }
      } while ($continue);
  
      return $n;
    }
code: public function executeLog(string $queries): int
    {
      // Counter for the number of rows written/logged.
      $n = 0;
  
      $this->multiQuery($queries);
      do
      {
        $result = $this->mysqli->store_result();
        if ($this->mysqli->errno) $this->mySqlError('mysqli::store_result');
        if ($result)
        {
          $fields = $result->fetch_fields();
          while (($row = $result->fetch_row()))
          {
            $line = '';
            foreach ($row as $i => $field)
            {
              if ($i>0) $line .= ' ';
              $line .= str_pad((string)$field, $fields[$i]->max_length);
            }
            echo date('Y-m-d H:i:s'), ' ', $line, "\n";
            $n++;
          }
          $result->free();
        }
  
        $continue = $this->mysqli->more_results();
        if ($continue)
        {
          $tmp = $this->mysqli->next_result();
          if ($tmp===false) $this->mySqlError('mysqli::next_result');
        }
      } while ($continue);
  
      return $n;
    }
code_tokens: public function executeLog ( string $ queries ) : int { // Counter for the number of rows written/logged. $ n = 0 ; $ this -> multiQuery ( $ queries ) ; do { $ result = $ this -> mysqli -> store_result ( ) ; if ( $ this -> mysqli -> errno ) $ this -> mySqlError ( 'mysqli::store_result' ) ; if ( $ result ) { $ fields = $ result -> fetch_fields ( ) ; while ( ( $ row = $ result -> fetch_row ( ) ) ) { $ line = '' ; foreach ( $ row as $ i => $ field ) { if ( $ i > 0 ) $ line .= ' ' ; $ line .= str_pad ( ( string ) $ field , $ fields [ $ i ] -> max_length ) ; } echo date ( 'Y-m-d H:i:s' ) , ' ' , $ line , "\n" ; $ n ++ ; } $ result -> free ( ) ; } $ continue = $ this -> mysqli -> more_results ( ) ; if ( $ continue ) { $ tmp = $ this -> mysqli -> next_result ( ) ; if ( $ tmp === false ) $ this -> mySqlError ( 'mysqli::next_result' ) ; } } while ( $ continue ) ; return $ n ; }
docstring: Executes a query and logs the result set.
  
  @param string $queries The query or multi query.
  
  @return int The total number of rows selected/logged.
  
  @since 1.0.0
  @api
docstring_tokens: Executes a query and logs the result set .