| @@ 2-19 (lines=18) @@ | ||
| 1 | <?php |
|
| 2 | class Lib_Test_Enterprise_QueryTest extends Lib_Test_TestAbstractEnterprise |
|
| 3 | { |
|
| 4 | public function getTestName() |
|
| 5 | { |
|
| 6 | return 'Query'; |
|
| 7 | } |
|
| 8 | ||
| 9 | protected function _run() |
|
| 10 | { |
|
| 11 | $query = 'SELECT Id,Name from Account limit 5'; |
|
| 12 | $response = $this->_mySforceConnection->query($query); |
|
| 13 | ||
| 14 | foreach ($response->records as $record) { |
|
| 15 | print_r($record); |
|
| 16 | print "<br>"; |
|
| 17 | } |
|
| 18 | } |
|
| 19 | } |
|
| @@ 2-21 (lines=20) @@ | ||
| 1 | <?php |
|
| 2 | class Lib_Test_Partner_QueryTest extends Lib_Test_TestAbstractPartner |
|
| 3 | { |
|
| 4 | public function getTestName() |
|
| 5 | { |
|
| 6 | return 'Query'; |
|
| 7 | } |
|
| 8 | ||
| 9 | protected function _run() |
|
| 10 | { |
|
| 11 | // $query = 'SELECT Id,Name,BillingStreet,BillingCity,BillingState,Phone,Fax from Account Limit 1'; |
|
| 12 | $query = 'SELECT Id, Name from Profile Limit 10'; |
|
| 13 | ||
| 14 | $response = $this->_mySforceConnection->query($query); |
|
| 15 | $queryResult = new QueryResult($response); |
|
| 16 | ||
| 17 | foreach ($queryResult->records as $record) { |
|
| 18 | print_r($record); |
|
| 19 | } |
|
| 20 | } |
|
| 21 | } |
|