i am using PHRETS ( http://dangodesign.net/2013/01/getting-started-with-rets-for-php/ ) to pull data off of a MLS RETS server. i am successfully connecting to the server so the conditional is passing. but my queries are pulling no results. the provider tells me DMQL2 is the database. ive only ever worked with MySQL so im in the dark.
if($connect)
{
$sixmonths = date('Y-m-d\TH:i:s', time()-15778800); // get listings updated within last 6 months
/* Search RETS server */
$search = $rets->SearchQuery
(
'Property', // Resource
//6, // Class
'ResidentialProperty',
'((Lud='.$sixmonths.'+),(Status=A))', // DMQL, with SystemNames
array(
'Format' => 'COMPACT-DECODED',
'Select' => 'sysid,49,112,175,9,2302,2304',
'Count' => 1,
'Limit' => 20
)
);
/* If search returned results */
if($rets->TotalRecordsFound() > 0)
{
while($data = $rets->FetchRow($search))
{
print_r($data);
}
}
else
{ echo '0 Records Found'; }
$rets->FreeResult($search);
}