在PHP中找到0条记录

在PHP中找到0条记录,php,mysql,arrays,database-connection,rets,Php,Mysql,Arrays,Database Connection,Rets,我正在和一个MLS服务器交谈,我很确定我在上面。它不会给我任何数组。 我已成功登录 我在这里列出了两个列表,您可能需要知道。 [列表10]=>开始日期 [列表15]=>状态 这起作用了 if($connect) { /* Get table layout */ $fields = $rets->SearchQuery("Property", "A"); /* Take the system name / human name and place in an arr

我正在和一个MLS服务器交谈,我很确定我在上面。它不会给我任何数组。 我已成功登录 我在这里列出了两个列表,您可能需要知道。 [列表10]=>开始日期
[列表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();
}
}
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);
        }
    }
}
返回找到的0条记录

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();
}
}
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);
        }
    }
}
我正在使用本教程: 是否有任何信息可以提供更多帮助?

将您的DMQL更改为:

'((LIST_10>='.$sixmonths.'+),(LIST_15=ACT))'
'((LIST_10>='.$sixmonths.'+),(LIST_15=ACT))'
致:

还要确保字段名称正确,并尝试使用标准名称而不是系统名称。

将您的DMQL更改为:

'((LIST_10>='.$sixmonths.'+),(LIST_15=ACT))'
'((LIST_10>='.$sixmonths.'+),(LIST_15=ACT))'
致:

您不需要在查询中使用“>号,这就是+号的含义。我发现这个网站对DMQL查询有很好的介绍:

如果您能够连接到PHPRETS,那么您只需要尝试更改以下查询并尝试处理结果


你能把元数据粘贴到网上的某个地方吗?

:(它没有解决问题是“(LIST_35;=thisPart)“标准还是必须查询才能找到正确的选项。因为我尝试了查询这些选项,但也没有效果。@BriggsI在页面上还没有任何HTML。它们都有相同的起始代码。
我完全不知道我在做什么,我从来没有用php做过任何事情。我所知道的只是HTML、CSS、JQuery以及如何遵循它们。”教程。这么说吧:我刚刚注意到,当我FTP到主机时,活动监视器上出现了
状态:检索目录列表…命令:TYPE I Response:200 TYPE现在是8位二进制命令:PASV Response:227进入被动模式(#,#,#,#,#,#)Command:MLSD Response:150 Accept data connection Response:226 Options:-a-l Response:226 18 matches total status:Directory listing successful
很抱歉,我无法让他们自己运行我不需要代码或任何东西。我需要属性的元数据,特别是您尝试查询的列/字段。