virtualranger
Technical User
I have two tables with a one to many relationship. The first table ('link') contains a list of unique links between tenants and properties. The status of these links can be changed by the user (e.g from 'viewing' to 'tenant'). When the status changes it updates the record in the link table with the new status and puts an entry in the second table ('history') with the link reference, status, user_id, and the date. Thus we have a historical record of the link status.
Hope that makes sense!
For every record in the link table I want to extract only the last (most recent) record in the history table. I'm not sure how to do it. Any ideas, or will you need more info on table structures?
Thanks,
Jamie
Hope that makes sense!
For every record in the link table I want to extract only the last (most recent) record in the history table. I'm not sure how to do it. Any ideas, or will you need more info on table structures?
Thanks,
Jamie