RETS DMQL2 查询问题
RETS DMQL2 Query Issues
我在使用系统名称 "proptype" 时获取数据时遇到问题。
这是我的 DMQL2 查询代码(使用 PHRets):
$search = $rets->SearchQuery(
"Property", // Resource
tt_res, // Class
"(dtlist=1990-01-01+), (proptype=1)", // DMQL
array(
"Select" => "listno,taxes,taxid,status,premarket,ownertype,image,dtphoto,housenum,dirpre,street,dirpost,coordew,coordns,city,state,zip,nonstandaddress,latitude,longitude,proptype,style,listprice,agent,contact,contacttype,contactph1,totbathfull,totbathhalf,totbath,totbed,totsqf,publicremarks,taxid,taxes,dimacres,yearblt,featuresint,featuresext,dtlist,windows,heating,aircon,basmntfin,floor,proptype,lotfacts,roof,landscape,exterior,deck,patio,garage,capgarage,capcarport,inclusions,amenities,water,utilities,pool,zoningchar,cooling,heating,dtlist,schooldistrict,schoolelem,schooljunior,schoolprivate,schoolsenior,schoolother",
//'Select' => *,
"Format" => "COMPACT",
"Count" => 1,
"Limit" => 99
)
);
如果我从搜索查询中删除 (proptype=1),查询将返回数据。有了它 (proptype=1),我得到以下错误:
Array ( [type] => rets [code] => 20203 [text] => Internal SQL error: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '1')))' at line 1 )
如果我输入 (proptype='1'),我会收到以下错误:
Array ( [type] => rets [code] => 20203 [text] => Could not parse DMQL2 Query: Lookup PROPTYPE_16 defines no lookup type with value: ''1'' at or near position 94. [...(proptype= !-->'1')),((sta] )
根据我的理解,以及retsmd给出的信息,"proptype"或属性类型,是一个LookupMulti(多值查找)解释类型。它也有 6 行,值为 1-6。我不确定我是否正确构建了查询多值查找。
有人可以帮我解释一下吗?我被难住了。
道具类型字段是一个查找字段。 REST 要求查询在对查找字段的代码进行搜索时使用查找运算符 (=|
)。
尝试使用 (proptype=|1)
我在使用系统名称 "proptype" 时获取数据时遇到问题。
这是我的 DMQL2 查询代码(使用 PHRets):
$search = $rets->SearchQuery(
"Property", // Resource
tt_res, // Class
"(dtlist=1990-01-01+), (proptype=1)", // DMQL
array(
"Select" => "listno,taxes,taxid,status,premarket,ownertype,image,dtphoto,housenum,dirpre,street,dirpost,coordew,coordns,city,state,zip,nonstandaddress,latitude,longitude,proptype,style,listprice,agent,contact,contacttype,contactph1,totbathfull,totbathhalf,totbath,totbed,totsqf,publicremarks,taxid,taxes,dimacres,yearblt,featuresint,featuresext,dtlist,windows,heating,aircon,basmntfin,floor,proptype,lotfacts,roof,landscape,exterior,deck,patio,garage,capgarage,capcarport,inclusions,amenities,water,utilities,pool,zoningchar,cooling,heating,dtlist,schooldistrict,schoolelem,schooljunior,schoolprivate,schoolsenior,schoolother",
//'Select' => *,
"Format" => "COMPACT",
"Count" => 1,
"Limit" => 99
)
);
如果我从搜索查询中删除 (proptype=1),查询将返回数据。有了它 (proptype=1),我得到以下错误:
Array ( [type] => rets [code] => 20203 [text] => Internal SQL error: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '1')))' at line 1 )
如果我输入 (proptype='1'),我会收到以下错误:
Array ( [type] => rets [code] => 20203 [text] => Could not parse DMQL2 Query: Lookup PROPTYPE_16 defines no lookup type with value: ''1'' at or near position 94. [...(proptype= !-->'1')),((sta] )
根据我的理解,以及retsmd给出的信息,"proptype"或属性类型,是一个LookupMulti(多值查找)解释类型。它也有 6 行,值为 1-6。我不确定我是否正确构建了查询多值查找。
有人可以帮我解释一下吗?我被难住了。
道具类型字段是一个查找字段。 REST 要求查询在对查找字段的代码进行搜索时使用查找运算符 (=|
)。
尝试使用 (proptype=|1)