title: SOQL query not returning rows that do exist on visualforce page
body: <p>SOQL query not returning rows on visualforce page that do exist in object I am having issues retrieving records which exist from an object via a SOQL query on a visualforce page </p>
  
  <p>How do I know they exist? I have used force explorer and workbench and the following returns a record</p>
  
  <pre><code>SELECT Code__c FROM External_membership_label__c WHERE Code__c = '3'
  </code></pre>
  
  <p>OK, so the visualforce page does not return the record above, with the code below (few lines from code)</p>
  
  <pre><code>  public String gvlLCCODE {get;set;}
  
    if(gvlLCCODE != null || gvlLCCODE != ''){
  
          List&lt;External_membership_label__c&gt; exisitingGVLcodes = [SELECT Code__c FROM External_membership_label__c WHERE Code__c = :gvlLCCODE];
  
          if (exisitingGVLcodes.Size() &gt; 0){
              //blahh blahh
          }
  }
  </code></pre>
  
  <p>Any suggestions? I have debug telling me 'gvlLCCODE' has a value that exists in the object. Also, if I change the SOQL to say, for example, return the current user from the users table, it returns a record and then enters the IF statement. </p>
  
  <p>I think its a security issue I have missed. But I have also checked these. </p>
  
  <p>Thank you </p>