I have a mysql db with these columns:
story_id (unique), user_id (foreign key), story, post_date
I currently show on my web page, a default story, which is the story with the last (most recent) post date, so I used the following query:
$sql = mysql_query("SELECT story, post_date FROM memberstories WHERE user_id='$id' ORDER BY post_date DESC LIMIT 1");
Then I just echo the story and its post_date onto the page.
What I want to do now, is add two links "Prev." and "Next" to my web page. So that when someone clicks on previous, they will be shown the previous posted story by that user, and so on. And when they click next, they will be shown the next posted story, and so on. Kind of like click scrolling through each story.
I am just having a little trouble figuring out what query would work in conjunction with the default story grabber above.... Any ideas?