Activity Forums Salesforce® Discussions Sql request problem

  • Sql request problem

  • Michel Dupont

    June 1, 2021 at 12:15 pm

    until now I used php 5.6 and for sql request i had created a dynamic syntax like this:

    function getInfo($table,$where,$field,$path="",$single="yes"){
        $query = "SELECT ".$field." from ".$table." ".$where; 
      	$response = $mySforceConnection->query($query);   
        $queryResult = new QueryResult($response);
      	for ($queryResult->rewind(); $queryResult->pointer < $queryResult->size; $queryResult->next()) 
                       if($tab_field[$i]=="Id") $value=$queryResult->current()->Id;
                       else                     $value=$record->fields->$tab_field[$i];
                       ..... suite du traitement

    It worked very well, but now with php7 the $value (not ID whose is static) are empty, and the values contain in $tab_field[$i] are correct.
    Is somebody can help me please?
    Thanks a lot in advance

Viewing 1 of 1 posts

Log In to reply.

Popular Salesforce Blogs

Popular Salesforce Videos

Popular Salesforce Infographics