hopefully there is a simple resolution to my challenge.
I have a parent table I will call table ‘A’ and a child table called table ‘B’. I would
like to get information from the most recent row in table ‘B’ for a given row in table
‘A’.
For example… parent 12345 in Table ‘A’ has three child rows in table ‘B’. Row number
3 is the most recent row in table ‘B’ for parent 12345. I would like to get row 3’s
information.
I tried quite a few different approaches and could not get it to do what is needed, hence my posting this here.
Thank you in advance.
Use an
INNER JOINon the two tables, relating them by the child id to the parent’s child id:I was going to suggest:
But apparently MySQL doesn’t support LIMIT on an inner select.