best option for cleaning up local DB

76 views
Skip to first unread message

Pyotr79

unread,
Oct 22, 2009, 1:13:46 PM10/22/09
to PHRETS
I am fairly new to rets. I am pulling data and storing it locally in
a DB. I only get Active listings in my results from a Query so my
question is what is the best way to clean up old listings out of the
DB? The Person who was doing the RETS programming before me was just
emptying the table each night and re-populating it. I know there has
to be a better way, but I am stumped. Any suggestions would be
greatly appreciated.

Troy Davisson

unread,
Oct 22, 2009, 1:18:23 PM10/22/09
to phr...@googlegroups.com
http://wordpress1.flexmls.com/support/rets/tutorials/how-to-efficiently-replicate-rets-data/

Specifically step 3 but the 3 parts are important together.

Pyotr79

unread,
Oct 22, 2009, 1:43:01 PM10/22/09
to PHRETS
Thanks this information was very helpful.

On Oct 22, 12:18 pm, Troy Davisson <troy.davis...@gmail.com> wrote:
> http://wordpress1.flexmls.com/support/rets/tutorials/how-to-efficient...

W Bowley

unread,
Oct 29, 2012, 8:58:07 AM10/29/12
to phr...@googlegroups.com
Not all RETS providers give access to the Deleted resource, so this
might not be an option for everybody. The other possibility is to
perform a full download of all resources from a given start date, and
once that's completed, delete from your images table where the sysid
isn't in the list of downloaded data. Again, this all depends on what
you are able to see from the RETS vendor.

On Thu, Oct 25, 2012 at 11:32 AM, Jason Kofoed <jko...@gmail.com> wrote:
> You can use the SearchQuery function to do this by passing the 'Deleted'
> property, like so:
>
> $rets_deleted_timestamp = "X_Deleted_Date";
> $timestamp_deleted_by = "2012-10-25T08:00:00"; //I think this gets any
> deletions from the 20th (you would run the deleted date with current day
> timestamp)
>
> $query = "(".$rets_deleted_timestamp_field."=".$timestamp_deleted_by.")";
> $search = $rets->SearchQuery("Deleted", "Property", $query, array('Limit'
> => $limit, 'Offset' => $offset, 'Format' => 'COMPACT-DECODED', 'Count' =>
> 1));
>
> I've had limited experience and I may be wrong about how the date works. I
> just cut and pasted a line from the example code and edited the function
> parameters to show the usage. Your deleted_timestamp field may be
> different. check retsmd.com and use your rets login to check that out.
>
> Jason
>
>
> On Monday, September 24, 2012 9:42:49 AM UTC-5, Jonathan Kratzke wrote:
>>>
>>> This page no longer exists, do you have any other resources? I am needing
>>> to safely perform this exact task. Thanks Troy.
>
> --
> You received this message because you are subscribed to the Google Groups
> "PHRETS" group.
> To view this discussion on the web visit
> https://groups.google.com/d/msg/phrets/-/m_f1XunCQHIJ.
> To post to this group, send email to phr...@googlegroups.com.
> To unsubscribe from this group, send email to
> phrets+un...@googlegroups.com.
> For more options, visit this group at
> http://groups.google.com/group/phrets?hl=en.
Reply all
Reply to author
Forward
0 new messages