original_string: private function fields($records, $insert = false) {
          $fields = array();
          
          foreach($records as $field => $value) {
              if($insert === true) {
                  $fields[] = sprintf("`%s`", SafeString::makeSafe($field));
                  $this->prepare[] = '?';
              }
              else{
                  $fields[] = sprintf("`%s` = ?", SafeString::makeSafe($field));
              }
              $this->values[] = $value;
          }
          return implode(', ', $fields);
      }
code: private function fields($records, $insert = false) {
          $fields = array();
          
          foreach($records as $field => $value) {
              if($insert === true) {
                  $fields[] = sprintf("`%s`", SafeString::makeSafe($field));
                  $this->prepare[] = '?';
              }
              else{
                  $fields[] = sprintf("`%s` = ?", SafeString::makeSafe($field));
              }
              $this->values[] = $value;
          }
          return implode(', ', $fields);
      }
code_tokens: private function fields ( $ records , $ insert = false ) { $ fields = array ( ) ; foreach ( $ records as $ field => $ value ) { if ( $ insert === true ) { $ fields [ ] = sprintf ( "`%s`" , SafeString :: makeSafe ( $ field ) ) ; $ this -> prepare [ ] = '?' ; } else { $ fields [ ] = sprintf ( "`%s` = ?" , SafeString :: makeSafe ( $ field ) ) ; } $ this -> values [ ] = $ value ; } return implode ( ', ' , $ fields ) ; }
docstring: Build the field list for the query
  @param array $records This should be an array listing all of the fields
  @param boolean $insert If this is an insert statement should be set to true to create the correct amount of queries for the prepared statement
  @return string The fields list will be returned as a string to insert into the SQL query
docstring_tokens: Build the field list for the query