PHRETS
PHRETS copied to clipboard
FetchRow and SearchQuery not available in PHRETS\Session
When using
$search = $rets->SearchQuery("Property","RES","(ListDate=1990-01-01+)");
or
while ($record = $rets->FetchRow($search)) {
$this_record = array();
foreach ($fields_order as $fo) {
if ($fo == 'L_ListingID') {
$photos = $rets->GetObject("Property", "Photo", $record[$fo], "*", 1);
foreach ($photos as $photo) {
if ($photo['Success'] == true) {
file_put_contents("photos/{$photo['Content-ID']}-{$photo['Object-ID']}.jpg", $photo['Data']);
}
}
}
$this_record[] = $record[$fo];
}
fputcsv($fh, $this_record);
}
I'm told that they are not available in PHRETS\Session. Any Idea on how to resolve this?