+ Start a Discussion

How to display the DISTINCT records from salesforce to PHP page?


     I have created a PHP page in that i wrote a query to retrieve the records from salesforce.com. The query works fine and displaying the records. Now i want to display the DISTINCT records in PHP page, as salesforce.com doesn't support DISTINCT keyword can anyone tell me is there anyother way to get the DISTINCT records.


I have tried a function array_unique() also but its showing all the records. Pls kindly tell the alternative solution to get the DISTINCT records.


Message Edited by Coder on 07-17-2009 09:10 PM



Honestly, it's considered bad forum etiquette to post a question before you've searched the forum for the answer. This has been asked and answered several times. SOQL is not SQL and it does not have the DISTINCT clause. Just a search and few results...










 You can also look at the PHP docs for array_unique which removes duplicates from an array.



Message Edited by ptepper on 07-11-2009 02:46 PM
Message Edited by ptepper on 07-11-2009 02:46 PM