Missing close parenthesis on subquery PHRETS

364 Views Asked by At

I am getting

Missing close parenthesis on subquery

error while trying to get listings using RETS https://github.com/troydavisson/PHRETS/issues/104

Here is the code query I am passing

$results = $rets->Search('Property', '1', "(138=2016-01-01+),(37=|601,602,603,604,605,606),(242=|ER,S,X),(68=3+),(122=3+)",
        [
        'QueryType' => 'DMQL',
        'Count' => 1, 
        'Format' => 'COMPACT',
        'Limit' => 99999999,
        ]);
2

There are 2 best solutions below

1
On

The error suggests to me that one of those fields is a field type that doesn't exactly match the type of value you're searching.

Can you use something like www.retsmd.com to see what the defined types are for those fields in the query?

0
On

Found the issue, posting the answer if helpful for anyone. field didn't exist so it was throwing error, which wasn't relevant to actual error.