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
PtitFredPtitFred 

How to get a lot of DATA from SalesForce with php

Hello, I have to get more than 20 000 accounts from SalesForce
1- It is possible ?
2- What the best solution ?

This is my code :
$cols = array("Id","Name");
$table = "Account";
$query_str = "select ".implode(",",$cols)." from ".$table."".$where;
$result = $client->query($query_str,300);

if (PEAR::isError($result)) {
print $result->getMessage();
}else{
$records = $result->records;
if($result->size > 0){
$done = 'false';
while($done == 'false') {
for($i=0;$i// put data in the client database
}
$done = $result->done;
if($done == 'false') {
$result = $client->queryMore($result->queryLocator);
$records = $result->records;
}
}
}
}

I Have timedout error, I can't get more than 6 000 lines...
Somebody can help me please ? :]

Message Edited by PtitFred on 10-14-2005 09:26 AM

Message Edited by PtitFred on 10-17-2005 02:24 AM