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
skompoltskompolt 

Id not being retrieved by query with php

The following query is not resulting with the Contact Id...

if (!$mylogin) {
        echo "ERROR connecting to SFDC fetch_record.";
       print_array($mySforceConnection -> result);
        return null;
    } else {
        $query = "Select Id, LastName,  FirstName, Email FROM Contact  where Email ='".$email."'";

        $response = $mySforceConnection->query($query);
        foreach ($response->records as $record)
        {
            $contactId =  $record->Id;
       }
       echo "Results of query $query <br/><br/>\n";
       echo "Contact =$contactId<br/><br/>\n";
       //echo "Results of response '$response->Id.' <br/><br/>\n";
        return $response["records"]->values;
    }