• Chris Macdonald
  • NEWBIE
  • 0 Points
  • Member since 2014

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 1
    Questions
  • 1
    Replies

I posted this on the Stack Exchange but haven't got much of a response there (after bountying it too). I have the following query:
 

SELECT Column1__c, Column2__c, Column3__c, Column4__c, Column5__c, Column6__c FROM Table__c where Column5__c >= 2016-09-29
 



Columns1 and Column2 fail to return data for me. If I execute the same query in WorkBench it works fine so I think it must be a setting I'm missing. Column1 and Column2 are booleans. I'm using the PHP Tool Kit version 20.

API Code:
 

try {
    $salesforce = new SforceEnterpriseClient();
    $salesforce->createConnection('salesforce_connector/soapclient/enterprise.wsdl.xml');
    $salesforce->login('user', 'pass');
    $query = 'SELECT Column1__c, Column2__c, Column3__c, Column4__c, Column5__c, Column6__c
    FROM Table__c
    where Column3__c >= ' . date('Y-m-d');
    $options = new QueryOptions(2000);
    $salesforce->setQueryOptions($options);
    $response = $salesforce->query($query);
    die(print_r($response));
 



Response:

 

[1878] => SObject Object ( 
     [type] => 
     [fields] => 
     [Column3__c] => 2016-12-31 
     [Column4__c] => 0022000000abcHcAAI 
     [Column5__c] => 43892 
     [Column6__c] => 2013-06-01 
)

I posted this on the Stack Exchange but haven't got much of a response there (after bountying it too). I have the following query:
 

SELECT Column1__c, Column2__c, Column3__c, Column4__c, Column5__c, Column6__c FROM Table__c where Column5__c >= 2016-09-29
 



Columns1 and Column2 fail to return data for me. If I execute the same query in WorkBench it works fine so I think it must be a setting I'm missing. Column1 and Column2 are booleans. I'm using the PHP Tool Kit version 20.

API Code:
 

try {
    $salesforce = new SforceEnterpriseClient();
    $salesforce->createConnection('salesforce_connector/soapclient/enterprise.wsdl.xml');
    $salesforce->login('user', 'pass');
    $query = 'SELECT Column1__c, Column2__c, Column3__c, Column4__c, Column5__c, Column6__c
    FROM Table__c
    where Column3__c >= ' . date('Y-m-d');
    $options = new QueryOptions(2000);
    $salesforce->setQueryOptions($options);
    $response = $salesforce->query($query);
    die(print_r($response));
 



Response:

 

[1878] => SObject Object ( 
     [type] => 
     [fields] => 
     [Column3__c] => 2016-12-31 
     [Column4__c] => 0022000000abcHcAAI 
     [Column5__c] => 43892 
     [Column6__c] => 2013-06-01 
)