我正在与一个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/,有什么信息可以帮助更多吗?
发布于 2014-02-17 05:04:52
将DMQL更改为:
'((LIST_10>='.$sixmonths.'+),(LIST_15=ACT))'至:
'((LIST_10='.$sixmonths.'+),(LIST_15=ACT))'您不需要查询中的>符号,这就是+符号的含义。我发现这个站点对DMQL查询有一个很好的介绍:FlexMLS
如果您能够连接到PHPRETS,那么只需尝试更改以下查询并尝试处理结果。
你能把元数据贴在什么地方吗?
发布于 2014-02-14 03:48:59
将DMQL更改为:
'((LIST_10>='.$sixmonths.'+),(LIST_15=ACT))'至:
'(LIST_10>={$sixmonths}+),(LIST_15=ACT)'此外,请确保字段名是正确的,并尝试使用标准名称而不是系统名称。
https://stackoverflow.com/questions/21759420
复制相似问题