I'm working on a real estate site and have been able to show the listings from rets server.I am using phrets. I can't make the search system work properly. Here is my search query :
$search = $rets->SearchQuery(
'Property', // Resource
1, // Class
'((130=2013-10-02T16:00:00+),(213=A))', // DMQL
array(
'Format' => 'COMPACT-DECODED',
'Select' => 'sysid,13,1491',
'Count' => 1,
'Limit' => 3
)
);
130=system for last update date.
213=system name for status.
It works well.It can pull all the listings i want. But i went through some real estate site. They execute a search query at the very first page. When someone writes down 3 or more letters in the input box, a dropdown list appears down the input box which contains handful cities started with those letters and on click any of the cities pulls the listings form that city.
But here in my case my system name for city is 1491 and when i write (1491=somerset) it pulls all the listings in the somerset city. I am wondering how i can do the first step while writing down couple of letters will show me the name of the cities relating to those letters.
As DMQL query suggest me to do this way (1491=*som*)
it should bring up all the cities that contain 'som'. But i can't make it work. I am trying very hard over the last few days and with the very few resource in internet i find myself not able to figure it out.
Any help would greatly be appreciated.