Okay, here's what I have:
Table: element_logs
Columns:
id (int, PK)
parent_id (int)
element_id (int, FK)
updated_at (datetime)
What I'd like to do is find the most recent element_ids with the same parent_id.
That is, given a parent_id of say 5, and a date of yesterday, I want the id of each most recent element_id.
I have a feeling it's easier than I'm making it. Any suggestions/help?
-------------------------
Matt Grande
C# Master.
Ruby on Rails Admirer.
ActionScript Student.
JavaScript Hate-Monger.
Table: element_logs
Columns:
id (int, PK)
parent_id (int)
element_id (int, FK)
updated_at (datetime)
What I'd like to do is find the most recent element_ids with the same parent_id.
That is, given a parent_id of say 5, and a date of yesterday, I want the id of each most recent element_id.
I have a feeling it's easier than I'm making it. Any suggestions/help?
-------------------------
Matt Grande
C# Master.
Ruby on Rails Admirer.
ActionScript Student.
JavaScript Hate-Monger.