-
Sql request problem
Hi
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"){ $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 } } .........
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
Log In to reply.
Popular Salesforce Blogs

LWC vs React: An In-Depth Comparison of Component-Based UI Frameworks
In the ever-evolving realm of web development, where innovation constantly pushes the boundaries of what can be achieved, two front-end frameworks have emerged as leaders…

Dynamic Components Creation in Aura | The Ultimate Salesforce Guide
Hello Devs, in Salesforce Aura framework, dynamic component creation stands as a powerful capability, enabling the generation of components dynamically during runtime, a functionality pivotal…

Move Towards A Subscription-Based Business Model | Salesforce Guide
Subscription-based business models have grown significantly over the past few years. In fact, Forbes states that eCommerce-based businesses used this model and doubled their growth…
Popular Salesforce Videos
What are Fields in Salesforce Admin?
Identity, system, and name fields are standard on every object in Salesforce. Each standard object also comes with a set of prebuilt, standard fields. You can…
Spring '21 Release - Time-dependent Action in Salesforce Flows
If you’re familiar with scheduled actions in Process Builder or time-dependent actions in workflow rules, know that scheduled paths on record-triggered flows can accomplish the…
Apex Scheduler in Salesforce | Asynchronous Apex
Asynchronous Apex 1. Apex Scheduler 2. Interfaces in Apex Scheduler 3. Making callout using Apex Scheduler 4. Points to Remember Upcoming Video on How to…
Popular Salesforce Infographics

7 Must Know Features on the New Salesforce AppExchange
Personalized recommendations, intelligent search, and new solutions are just a few of the exciting new features on the brand new AppExchange. Check it out at…

Top 10 Salesforce Consulting Companies in India
Looking to hire a best Salesforce consulting company in India for your business? Here is a without-favour list of the top 10 Salesforce consulting companies…

Growth of Salesforce (Data and figures)
Salesforce.com is the #1 Customer Relationship Management (CRM) company in the world with regard to the market share. It provides numerous CRM software that helps…