original_string: public static function tableInsertBatchIterate($tableName, $fields, $values, $ignoreWhenDuplicate = true)
      {
          $fieldList = '(' . join(',', $fields) . ')';
          $ignore    = $ignoreWhenDuplicate ? 'IGNORE' : '';
  
          foreach ($values as $row) {
              $query = "INSERT $ignore INTO " . $tableName . "
  					  $fieldList
  					  VALUES (" . Common::getSqlStringFieldsArray($row) . ")";
              Db::query($query, $row);
          }
      }
code: public static function tableInsertBatchIterate($tableName, $fields, $values, $ignoreWhenDuplicate = true)
      {
          $fieldList = '(' . join(',', $fields) . ')';
          $ignore    = $ignoreWhenDuplicate ? 'IGNORE' : '';
  
          foreach ($values as $row) {
              $query = "INSERT $ignore INTO " . $tableName . "
  					  $fieldList
  					  VALUES (" . Common::getSqlStringFieldsArray($row) . ")";
              Db::query($query, $row);
          }
      }
code_tokens: public static function tableInsertBatchIterate ( $ tableName , $ fields , $ values , $ ignoreWhenDuplicate = true ) { $ fieldList = '(' . join ( ',' , $ fields ) . ')' ; $ ignore = $ ignoreWhenDuplicate ? 'IGNORE' : '' ; foreach ( $ values as $ row ) { $ query = "INSERT $ignore INTO " . $ tableName . "
  					  $fieldList
  					  VALUES (" . Common :: getSqlStringFieldsArray ( $ row ) . ")" ; Db :: query ( $ query , $ row ) ; } }
docstring: Performs a batch insert into a specific table by iterating through the data
  
  NOTE: you should use tableInsertBatch() which will fallback to this function if LOAD DATA INFILE not available
  
  @param string $tableName PREFIXED table name! you must call Common::prefixTable() before passing the table name
  @param array $fields array of unquoted field names
  @param array $values array of data to be inserted
  @param bool $ignoreWhenDuplicate Ignore new rows that contain unique key values that duplicate old rows
docstring_tokens: Performs a batch insert into a specific table by iterating through the data