First time here? Check out the FAQ!
0

Cant get the data by running any search query

Hello, We have issue to get data by any search query through PHP. However, there is no problem for login. Please advise.

The URL is: http://nsar.rets.paragonrels.com/rets...

Login name: Login TPV16849

$params = array("Limit" => 10, "Format" => "STANDARD-XML", "Count" => 1, "StandardNames" => 1);

$search = $RETS->SearchQuery("Property","ResidentialProperty","(ListingID=40070609)",$params );

print_r($search);

kamran's avatar
kamran
asked 2015-11-23 13:42:57 -0500
bwolven's avatar
bwolven
updated 2015-11-23 15:08:28 -0500
edit flag offensive 0 remove flag close merge delete

Comments

add a comment see more comments

2 Answers

1

Thanks for the info. ListingID is a numeric field. Try using: (ListingID=0+)

bwolven's avatar
bwolven
answered 2015-11-23 15:02:53 -0500
edit flag offensive 0 remove flag delete link

Comments

we have follow step by step from this website :http://dangodesign.net/2013/01/getting-started-with-rets-for-php/ but still searchQuery method does not return any results. GetMetadataTable() works fine, as well as GetObject() for downloading the photos but SearchQuery() would not return any value.

kamran's avatar kamran (2015-11-25 11:02:08 -0500) edit

$params = array("Limit" => 10, "Format" => "COMPACT-DECODED");

$search = $RETS->SearchQuery("Property","RE_1","(ListingID=0+)", $params ); print_r($search);

kamran's avatar kamran (2015-11-25 11:02:26 -0500) edit

How are you determining that it isn't returning any values? When I look at the RETS logs for today (11/25), it shows that all of your search request have returned either 10 or 20 records worth of data depending on the Limit that was set and the number of bytes returned?

bwolven's avatar bwolven (2015-11-25 12:26:37 -0500) edit

I'm not a PHP expert but this is how the site you provided shows to display the data. if($rets->TotalRecordsFound() > 0) { while($data = $rets->FetchRow($search)) { print_r($data); } } else { echo '0 Records Found'; }

bwolven's avatar bwolven (2015-11-25 12:36:48 -0500) edit

I have tried with RETS Connector Software to see if I can get value or not. but When I'm trying that on the website with php code which I have provided, I'm not able to get value.

kamran's avatar kamran (2015-11-25 12:50:36 -0500) edit

So are you doing: print_r($search); to display the data like your example showed above? Or are you doing it the proper way which would be: while($data = $RETS->FetchRow($search)) { print_r($data); } You fetch the row then print the row.

bwolven's avatar bwolven (2015-11-25 13:59:02 -0500) edit
add a comment see more comments
0

Thanks all we figured it out this session is closed

torrey's avatar
torrey
answered 2015-11-28 12:55:50 -0500
edit flag offensive 0 remove flag delete link

Comments

If you can update your comment with what you were doing wrong it could be helpful to others.

bwolven's avatar bwolven (2015-11-30 09:34:48 -0500) edit

right agin... we simply wanted to find out how to find the number used for "ListingID" the MLS admin had no idea how to get it. you gave it to us. thank you good bye

torrey's avatar torrey (2015-11-30 14:41:23 -0500) edit
add a comment see more comments

Your Answer

Login/Signup to Answer