Thanks for a speedy response, update() code:
PHP Code:
$sObject=new sObject();
$sObject->type='Contact';
$sObject->Id='id reference here';
//updating the password, a custom field on the contact object
$sObject->fields["Password__c"]=$_POST['newpass'];
$sObject->fields["Description"]="testing";
//print_r ($sObject);
$result=$mySforceConnection->update($sObject);
//print_r($result);
if($result->success){
$onload.="alert('Thanks. Password updated');";
}else{
$onload.="alert('".$result->errors[0]->message."');";
}
In terms of the queryMore code, I've come up with a workaround:
Basically when I get each row of the select result, i check for $result->records[$i]->sobjects, which gives me the nested sobjects and i proceed to add those to a holding array, which I then iterate through to build an html table.
Excuse my ignorance, but where is the API reference which has the php examples in it? Your posts there seem the most helpful. Well done.
Take the following code sample excerpt from
Creating Email Reports in PHP - ApexDevNet ("working with results" section):
PHP Code:
$_id = CampaignMember->sobjects[0]->Id;
$_name = $CampaignMember->sobjects[0]->fields->Name;
$_email = CampaignMember->sobjects[0]->fields->Email;
$_title = CampaignMember->sobjects[0]->fields->Title;
Surely lines 1,3 and 4 won't work here, as the object name should be $CampaignMember, not CampaignMember?
Anyway, any help would be appreciated