function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
M.M. 

sforce php query

Hello everyone....

I'm trying to query the salesforce database... I can successfuly login into the salesforce, but there seems to be something wrong with the query... can anybody help me here?

I'm ussing a login code, and then this...

try
{
    $result = $sforce->query(array("queryString" => "select Id from Lead where Lead.FirstName='Miguel'"));
    print_r($result);
    print "I'm not reaching this print";
} catch (Exception $e)
{
    print_r($e);
}


what happens is that it doesn't print the "I'm not reaching this print"... can anyone help me with this?
thank you

M.

Jim AndersonJim Anderson

Have you tried:

$Result = $sforce->query("select Id from Lead where Lead.FirstName='Miguel'");

Thats how I do them.