I am using mysql and I have a table with columns: postid, userid, datestamp
I want to create a new column called 'entry' that numbers the entries chronologically according to datestamp
So, for the rows:
3705 1 2003-12-08 13:42:13
3711 15 2003-11-12 15:22:01
3701 2 2004-01-11 01:22:12
I want to end up with:
3705 1 2003-12-08 13:42:13 2
3711 15 2003-11-12 15:22:01 1
3701 2 2004-01-11 01:22:12 3
How can I perform this task?