我正在使用 PHRETS PHP 库从 rets API 获取 RETS 数据。我有获取数据的问题。它给出“PHP 致命错误:未捕获的异常 'PHRETS\Exceptions\RETSException' 并带有消息 'Missing open parenthesis in subquery. Reference ID: fc63ca3e-c8a8-44cf-a0ce-4c729ce91fcc' in /XXXX/vendor/troydavisson/phrets/src/会话.php:379"。请帮助解决此错误。我的代码是:
<pre><code>
date_default_timezone_set('America/New_York');
require_once("vendor/autoload.php");
$config = new \PHRETS\Configuration;
$config->setLoginUrl('http://sef.rets.interealty.com/Login.asmx/Login');
$config->setUsername('XXXX');
$config->setPassword('XXXX');
// optional. value shown below are the defaults used when not overridden
$config->setRetsVersion('1.7.2'); // see constants from \PHRETS\Versions\RETSVersion
$config->setUserAgent('RETS-Connector/1.2');
$config->setUserAgentPassword('123456'); // string password, if given
$config->setOption('use_post_method', false); // boolean
$config->setOption('disable_follow_location', false); // boolean
$session = new \PHRETS\Session($config);
$connect = $session->Login();
$system = $session->GetSystemMetadata();
//var_dump($system);
$resources = $system->getResources();
$classes = $resources->first()->getClasses();
//var_dump($classes);
$classes = $session->GetClassesMetadata('Property');
//var_dump($classes->first());
$results = $session->Search("Property", "2", "*", ['Limit' => 3, 'Select' => '922']);
foreach ($results as $r) {
var_dump($r);
}
</pre></code>
它返回错误:[11-Mar-2017 06:32:59 America/New_York] PHP 致命错误:未捕获的异常 'PHRETS\Exceptions\RETSException' 并带有消息'缺少子查询中的左括号。参考 ID:fc63ca3e-c8a8-44cf-a0ce-4c729ce91fcc' 在 /home2/XXXX/vendor/troydavisson/phrets/src/Session.php:379 堆栈跟踪:
0 /home2/XXXX/vendor/troydavisson/phrets/src/Session.php(297): PHRETS\Session->request('Search', Array)
1 /home2/XXXX/index.php(34): PHRETS\Session->Search('Property', '2', '*', Array)
2 {主要}
在第 379 行的 /home2/XXXX/vendor/troydavisson/phrets/src/Session.php 中抛出