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);
    }
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);
    }
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 ) ; }
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
Build the field list for the query