Msg#: 4472717 posted 9:20 am on Jul 5, 2012 (gmt 0)
I am using PHRETS to pull MLS data.
My website has a search criteria like Area,Property Type and MLS listing. I am able to get results for both i.e when a user selects Property Type like SF, MF or CC or enters MLS listing number.
The problem is only with the Area, like if user selects an area I am unable to filter all properties(SF, MF, CC) in that area. I found few examples which are using a resource 'Property' but that resource is not available to me.
I'm not particularly familiar with the RETS protocol or the PHRETS api.
But if neither of these support the exact queries you would like to filter on, then it is likely you are going to need to do some additional filtering on your side. You would send their service a query that is as specific as possible, and anything else you filter before printing it to the user of your site.
When you say "if user selects an area I am unable to filter all properties(SF, MF, CC) in that area." I assume you are talking about trying to query the MLS Feed directly from an end user on your site?
I've always used the PhRETS client to simple be the middle-man between myself and the Feed and use it to update my DB/Tables on my local server. That way, you can do all your search filtering on your server's side like eelixduppy had stated.
Also, the inability to query the Feed in specific ways is generally not something to do with PhRETS, but instead the feed itself...MLS providers will put restrictions on how you can query it. The connection client can do whatever query you want, but if the feed doesn't allow it, you will receive an error message.
Basic logic of it is that you are going to need to create a table on your local server with the same field/column names your feed has. Then you need to query the feed to retrieve the data...make sure you are only selecting the fields/columns you have in your local table.
Once you've done your query, you can loop through the results and write them to a text file or csv. Once you have the info stored locally, you can grab the info and import that into your DB.
A bit hard to grasp...took me awhile to get my head around it, but hope that pointed you at least in the right direction.