First time here? Check out the FAQ!

Agent Data no longer returned

I have been using the following code to retrieve agent email and phone numbers for a listing. For some reason over the past few days the query no longer returns results. is there a change in this process or is it possible my account has been limited in what data i can fetch?

I get no errors returned, no data, not a thing that points to a failure or a point to start to identify the issue.

$search = $rets->searchQuery("Agent","Agent",("U_UserFirstName={$rec['LA11_UserFirstName]}),(U_UserLastName={$rec['LA1_UserLastName']})",array('Limit'=>1,'select'=>'*'));

if($rets->TotalRecordsFound() > 0) {

      $agent = $rets->FetchRow($search);
MDC IT Solutions's avatar
MDC IT Solutions
asked 2015-09-09 21:39:28 -0500, updated 2015-09-09 21:44:01 -0500
edit flag offensive 0 remove flag close merge delete


If you can provide your RETS Login URL and account name we can be of more help. Also what is "LA11_UserFirstName"? Is that possibly supposed to be "LA1_UserFirstName"?

bwolven's avatar bwolven (2015-09-10 08:54:12 -0500) edit

yes LA11_UserFirstName should be LA1_UserFirstName here is the information you requested

$loginUrl = ""; $username = "TPV16720";

MDC IT Solutions's avatar MDC IT Solutions (2015-09-10 09:12:41 -0500) edit
add a comment see more comments

1 Answer


From what I can tell from our logs, this is working now. I see requests from your account coming through and returning Agent records. Can you verify that it is indeed working on your end?

Also, if the Agent resource doesn't work, it could be that the account's profile is only allowed to access the ActiveAgent resource which is the same data but only active agents are returned.

Examining your request, you may want to change your search query to something like this: "(U_AgentID={$rec['L_ListAgent1]})"

This would be much more efficient since it is using the resource's key for the lookup and less error prone because you may have more than one user with the same first and last name values such as "John Smith" so you could return the wrong data.

bwolven's avatar
answered 2015-09-10 10:07:50 -0500
edit flag offensive 0 remove flag delete link


thank you for looking into this. Agent Data is now returning. I made the code improvements as you suggested. Just some legacy code from connecting to the previous mls system.

MDC IT Solutions's avatar MDC IT Solutions (2015-09-10 14:11:58 -0500) edit

I can see a reduction in transaction times in our logs just by making that minor change. Another thing you could do is batch 10 - 100 agent ID's and just do one request for the batch. For example: "(U_AgentID=1324,214,433)" this would reduce server load.

bwolven's avatar bwolven (2015-09-10 15:30:30 -0500) edit
add a comment see more comments

Your Answer

Login/Signup to Answer