RETS サーバーに接続し、GetMetadataResources、GetMetadataClasses、および各クラスのすべてのフィールドなどの PHrets ライブラリの関数を使用してすべてのメタデータを取得できますが、SearchQuery を使用してそのサーバーからデータを取得できません。あらゆる方法で試しましたが、運がない。
<pre>
/* Initialize Object */
require("PHRets_CREA.php");
require("credentials.php");
$rets = new PHRets();
$connect=$rets->Connect($RETSURL, $RETSUsername, $RETSPassword);
/* Connect */
/* Query Server */
if ($connect) {
echo "Connected";
$resources = $rets->GetMetadataResources();
foreach ($resources as $resource) {
echo "+ Resource {$resource['ResourceID']}\n";
$classes = $rets->GetMetadataClasses($resource['ResourceID']);
foreach ($classes as $class) {
echo " + Class {$class['ClassName']} described as " . $class['Description'] . "\n";
$rets_metadata = $rets->GetMetadata($resource['ResourceID'],$class['ClassName']);
foreach ($rets_metadata as $field) {
echo " + Field: {$field['SystemName']} ({$field['DataType']})\n";
}
}
}
/*
$search = $rets->SearchQuery("Property","RE_1","(L_ListingDate=2010-03-02-2010-03-03)");
while ($listing = $rets->FetchRow($search)) {
echo $listing['L_ListingID'];
}*/
$search = $rets->SearchQuery("Property","ResidentialProperty","(ListDate=1990-01-01+)",
array( "Count" => 1, "Format" => "COMPACT", "Limit" => "2", "Offset" => "2",
"RestrictedIndicator" => "****", "StandardNames" => 1 )
);
echo "data";
print_r($search);
while ($listing = $rets->FetchRow($search))
echo "{$listing['L_City']}";exit;
}
$rets->FreeResult($search);
}</pre>
Thanks