• Rephrase
  • NEWBIE
  • 0 Points
  • Member since 2012
  • Rephrase

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

Hi

 

I am having trouble querying Accounts in Salesforce via the API and a PHP script

 

I am getting the following error message

 

Fatal error: Call to undefined method stdClass::query()

 

The key part of my script is

 

// Connect
$client = new SforcePartnerClient();
$client->createConnection($wsdl);
$loginResult = $client->login($userName, $password);

// Query records
$query = "SELECT Id, FirstName, LastName, Phone from Contact";
$response = $loginResult->query($query);

 

Any suggestions?

 

Thanks

Frazer