You need to sign in to do that
Don't have an account?
Rephrase
Can't query Salesforce via API / PHP
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
amochkin
Just print_r($loginResult); and show us the result.