0

I am getting MLNumbers from RETS Server but now I need to get all the fields of all the MLNumbers and store into my database. Could anybody help me to write query to get the whole property Object.

Kara
  • 6,115
  • 16
  • 50
  • 57
Samdrain
  • 441
  • 4
  • 13

1 Answers1

1

If you have all the Listing Numbers then you just need to write a search query to pull all the results back and process the results. I haven't ever seen a field name MLNumber but you will have to figure that out:

<?php
$search = $rets->SearchQuery("Property","RES","(MLNumber=11111,22222,33333)");
while ($listing = $rets->FetchRow($search)) {
    echo "Address: {$listing['StreetNumber']} {$listing['StreetName']}, ";
    echo "{$listing['City']}, ";
    echo "{$listing['State']} {$listing['ZipCode']} listed for ";
    echo "\$".number_format($listing['ListPrice'])."\n";
}
$rets->FreeResult($search);

I think this should return the results you need. You will need to figure out the Resource/Class/Field name you need to use for your SearchQuery().

More PHRETS examples here.

dj_goku
  • 117
  • 6