stubarny Posted June 1, 2012 Share Posted June 1, 2012 Hello, I have a table of responses to an event invite (note people can resond multiple times if they change their mind): guest_name, guest_status, timestamp David, accepted, 2012-05-12 Peter, accepted, 2012-05-12 David, declined, 2012-06-02 Sam, accepted, 2012-06-02 Peter, tentative, 2012-06-12 So to display the latest statuses of invitees' responses I would want to display the following information: Accepted: Sam Tentative: Peter Declined: David Please could you tell me how to write an sql command that will do this? I'm struggling to write a command that only uses the most recent entry for each invitee. Thanks, Stu Quote Link to comment https://forums.phpfreaks.com/topic/263512-selecting-and-ordering/ Share on other sites More sharing options...
PFMaBiSmAd Posted June 2, 2012 Share Posted June 2, 2012 The get specific rows within a group, see this link - http://mysql.tonnikala.org/doc/refman/5.1/en/example-maximum-column-group-row.html Quote Link to comment https://forums.phpfreaks.com/topic/263512-selecting-and-ordering/#findComment-1350442 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.