我正在与 MLS 服务器通话,我很确定我在上面。它只是不会给我任何数组。
我登录成功
我提取了列表列表这里有两个您可能需要知道的。
[LIST_10] => 开始日期
[LIST_15] => 状态
这有效
if($connect) {
/* Get table layout */
$fields = $rets->SearchQuery("Property", "A");
/* Take the system name / human name and place in an array */
$table = array();
foreach($fields as $field) {
$table[$field['SystemName']] = $field['LongName'];
}
/* Display output */
print_r($table);
$rets->Disconnect();
}
}
返回 0 条记录
if($connect) {
$sixmonths = date('c', time()-15778800); // get listings updated within last 6 months
/* Search RETS server */
$search = $rets->SearchQuery(
'Property', // Resource
"A", // Class
'((LIST_10>='.$sixmonths.'+),(LIST_15=ACT))', // DMQL, with SystemNames
array(
'Format' => 'COMPACT-DECODED',
'Select' => 'LIST_0,LIST_1,LIST_34,LIST_39,LIST_40,LIST_0,LIST_133',
'Count' => 1,//0 no record count, data 1 record count + data 2 record count, no data
'Limit' => 20
)
);
/* If search returned results */
if($rets->TotalRecordsFound() > 0) {
while($data = $rets->FetchRow($search)) {
print_r($data);
}
}
}
我正在使用本教程:http://dangodesign.net/2013/01/getting-started-with-rets-for-php/ 是否有任何信息可以提供更多帮助?
最佳答案
从以下位置更改您的 DMQL:
'((LIST_10>='.$sixmonths.'+),(LIST_15=ACT))'
收件人:
'((LIST_10='.$sixmonths.'+),(LIST_15=ACT))'
您的查询中不需要 > 符号,这就是 + 符号的意思。我发现这个站点很好地介绍了 DMQL 查询:FlexMLS
如果您能够连接到 PHPRETS,那么您只需要尝试更改以下查询并尝试处理结果。
你能把元数据在线粘贴到某个地方吗?
关于php - 找到 0 条记录,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/21759420/