Ask Your Question

Revision history [back]

RETS Only getting partial city

Hi,

When I pull the L_City I'm only getting the first 5 characters of the city.

URL: http://gbhar-rets.paragonrels.com/rets/fnisrets.aspx/GBHAR/login

Account Name: aiclhuk

Version: 1.7.2

My Test Page: http://topshelfspearfish.com/testrets.php

$query = "(ListingID=0+)";

$select = 'ListingID,ListPrice,StreetNumber,StreetName,City,PostalCode,ListingStatus,Beds,Style,YearBuilt,Directions';

try {

echo "\n";

$results = $rets->Search('Property', 'RE_1', $query, ['Limit' => 1, 'Count' => 2]);

$recordCount = $results->getTotalResultsCount();

echo "Record Count: {$recordCount}\n\n";

$results = $rets->Search('Property', 'RE_1', $query,

[

'QueryType' => 'DMQL2',

'Count' => 1,

'Format' => 'COMPACT',

'Limit' => 20,

'StandardNames' => 1,

'Select' => $select,

]);

echo "Search Results:" . "\n";

foreach ($results as $r) {

echo $r['City'] . "\n";

//var_dump($r);

}

} catch (Exception $e)

{

echo "Search failed \n";

echo "Error: " . $e->getMessage() ."\n";

}

try {

$rets->Disconnect();

echo "\n";

echo "Logout" . "\n";

} catch (Exception $e)

{

echo "Logout failed\n";

echo "Error: " . $e->getMessage() . "\n";

}