1

Can you help me, I have got success in getting result by this code

 $search = $rets->Search("Property","RESI","(MLNumber=0+)");

 print_r($search);

But when I do query with multiple options, it shows error in debug file RETS ReplyCode="20206" ReplyText="Invalid Query Syntax."

And for this error my php code is

$search = $rets->Search("Property","RESI","(City=Lexington),(Status=Sold)");

print_r($search);

I have found that search should be done in specific pair, here http://www.rapattoni.com/supp/mls/rets/documents/PDF/RETS1_5_Product_Release_Notice.pdf

I'm not able to find where I'm wrong.

Thanks

Gaurav Rai
  • 93
  • 2
  • 13

2 Answers2

7

Anyways this answer is too late, but still I'm posting may be it be helpful for others. The search query should be written in specific pairs as mentioned in the above PDF file like

$search = $rets->Search("Property","RESI","(MLNumber=0+),(StatusDate=2013-06-01-2013-09-01)");

IMPORTANT: This is for rapattoni mls, this may differ from MLS to MLS.

I hope this would be helpful to someone.

Gaurav Rai
  • 93
  • 2
  • 13
0

If you just search for (City=Lexington) does it return results? Are you sure (Status=Sold) is correct? The syntax looks valid.

What MLS are you doing searches against?

dj_goku
  • 117
  • 6
  • Thanks for suggestion. No I'm not sure about (Status=Sold). MLS is Rapattoni. Were I can get exact and correct query syntax examples, please. Whatever I try I only get result Invalid Query Syntax. – Gaurav Rai Aug 28 '13 at 06:35
  • Try this: "(City=Lexington),(Status=S)" – dj_goku Aug 29 '13 at 16:48
  • I don't have access to Rapattoni, but knew someone who did and we still had Metadata info about them. I am 99% sure the above query I just gave you will work. The status field is actually a Lookup and the value you use in a query is not SOLD, but 'S'. Hope this helps. – dj_goku Aug 30 '13 at 16:12
  • Hi thanks, but I got the answer, since its a lookup so it should be written as STATUS=|SOLD this works – Gaurav Rai Sep 06 '13 at 06:00