1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22
| function getInfo($table,$where,$field,$path="",$single="yes"){
$mySforceConnection=connectTOsf($path);
$res=array();
$tab_field=array();
$contact="";
$x=0;$z=0;
try{
$query = "SELECT ".$field." from ".$table." ".$where;
$response = $mySforceConnection->query($query);
$queryResult = new QueryResult($response);
$tab_field=explode(",",$field);
for ($queryResult->rewind(); $queryResult->pointer < $queryResult->size; $queryResult->next())
{
$record=$queryResult->current();
for($i=0;$i<count($tab_field);$i++)
{
if($tab_field[$i]=="Id") $value=$queryResult->current()->Id;
else $value=$record->fields->$tab_field[$i];
..... suite du traitement
}
}
......... |
Partager