First time here? Check out the FAQ!
0

How to count total number of records

RETS URL : http://maxebrdi.rets.fnismls.com/Rets... Username: CCAR_Mooveguru

How can I query to find count of total records using phRETS. For ex. Count of active property. Thanks in advance.

chaitanya's avatar
chaitanya
asked 2018-02-14 12:22:03 -0500, updated 2018-02-14 12:24:18 -0500
edit flag offensive 0 remove flag close merge delete

Comments

add a comment see more comments

2 Answers

0

I'm not real familiar with PHRETS. RETS requires you pass in parameter Count=2 to return only the count. You can check with the PHRETS documentation on GitHub to see how to do this.

https://github.com/troydavisson/PHRETS

bwolven's avatar
bwolven
answered 2018-02-14 15:13:16 -0500, updated 2018-02-14 15:30:00 -0500
edit flag offensive 0 remove flag delete link

Comments

add a comment see more comments
0

Keep in mind your query will be returned as a JSON array object. So you can easily COUNT the number of records within the object with code like: count($queryResults)

For Example Let's say your query is all set up and you are ready to send it to the RETS server. Once the query is completed, you simply get a COUNT of records contained in the $queryResults array variable.

$queryResults = $session->Search("Property", $propertyClass, $mlsQuery);
$recordCount = count($queryResults);
DACO's avatar
DACO
answered 2018-08-09 07:26:23 -0500, updated 2018-08-09 07:27:01 -0500
edit flag offensive 0 remove flag delete link

Comments

add a comment see more comments

Your Answer

Login/Signup to Answer