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
zeezackzeezack 

CSV file export

I am using the php tool kit to connect to salesforce. I am trying to export the data as a csv file but I can not get it to seperate the information into different coloumns?

 

 

 

$query = "SELECT Id, Name from Claim__c ORDER BY LastModifiedDate DESC LIMIT 1"; $queryResult = $mySforceConnection->query($query); $records = $queryResult->records; //print_r($records); foreach ($records as $record) { $sObject = new SObject($record); $id= $sObject->Id; $Name= $sObject->fields->Name; $mass = array("$id", "$Name"); $csv.= implode(',', $mass)."\n"; }

 

 

 

msimondsmsimonds

Sir,

 

Maybe this script will help you >  http://www.mikesimonds.com/php-salesforce-csv-export-script-t155.html

 

 

 

~Mike