mysql> select * from guestbook;
+----+--------+---------+-----------------+----------------+
| id | fname | lname | comments | time_in |
+----+--------+---------+-----------------+----------------+
| 1 | Mick | White | Test 123 | 20050303191815 |
| 2 | Ann | White | Hello World | 20050303191931 |
| 3 | Ann | White | It's a nice day | 20050303191959 |
| 4 | Seamus | White | The cat | 20050303192028 |
| 5 | Matt | White | Words of wisdom | 20050303192509 |
| 6 | Sharon | Pombert | In the sticks | 20050303221802 |
| 7 | Tony | Jones | Cousin | 20050303222027 |
| 8 | Tony | Jones | Cousin's cousin | 20050303222133 |
| 9 | Matt | Dye | UR | 20050303222133 |
+----+--------+---------+-----------------+----------------+
I am trying to retrieve each person's latest comment. i.e every record
except id's 2 & 7 in this case.
Is this possible?
Mick
+----+--------+---------+-----------------+----------------+
| id | fname | lname | comments | time_in |
+----+--------+---------+-----------------+----------------+
| 1 | Mick | White | Test 123 | 20050303191815 |
| 2 | Ann | White | Hello World | 20050303191931 |
| 3 | Ann | White | It's a nice day | 20050303191959 |
| 4 | Seamus | White | The cat | 20050303192028 |
| 5 | Matt | White | Words of wisdom | 20050303192509 |
| 6 | Sharon | Pombert | In the sticks | 20050303221802 |
| 7 | Tony | Jones | Cousin | 20050303222027 |
| 8 | Tony | Jones | Cousin's cousin | 20050303222133 |
| 9 | Matt | Dye | UR | 20050303222133 |
+----+--------+---------+-----------------+----------------+
I am trying to retrieve each person's latest comment. i.e every record
except id's 2 & 7 in this case.
Is this possible?
Mick
Comment