Project

General

Profile

Revision aabdc3fa

IDaabdc3fa4c5b9d97823aec14d5b9c0a30f5c1ded
Parent 6c344346
Child 6854be8d

Added by Andreas Müller over 3 years ago

ref #6535 add quotation marks for hardcoded SQL propertyname parameter

View differences:

cdmlib-model/src/main/java/eu/etaxonomy/cdm/model/metadata/CdmMetaDataPropertyName.java
38 38
//**************** METHODS ****************************/
39 39

  
40 40
    public String getSqlQuery(){
41
        return "SELECT value FROM CdmMetaData WHERE propertyname=" + this.key;
41
        return String.format(
42
                "SELECT value FROM CdmMetaData WHERE propertyname='%s'",
43
                this.key);
42 44
    }
43 45

  
44 46
    /**
......
77 79

  
78 80
// *************************** DELEGATE **************************************/
79 81

  
80

  
82
 public static void main(String[] var){
83
     System.out.println(DB_SCHEMA_VERSION.getSqlQuery());
84
 }
81 85

  
82 86
}

Also available in: Unified diff

Add picture from clipboard (Maximum size: 40 MB)