I have a message system, there is an inbox with paging that list all the messages that you have, you can then click a message to read that message on its own page, I have been wanting to add links to this page to view previous message and view next message but Im not sure how to get these values.
select * from friend_mail_setting where user_id=1 and inbox="Yes" and sent="No" order by auto_id DESC limit 0,10
you can view a screenshot of this table attached to this thread
mysql above gets data to builds links on my inbox page like this below:
http://www.site.com/?p=mail.read&id=1545469&auto_id=3087637
http://www.site.com/?p=mail.read&id=1544735&auto_id=3086170
http://www.site.com/?p=mail.read&id=1543922&auto_id=3084554
Now on my read mail page I have mysql like this
select * from friend_mail_details where auto_id='1544735'
which would get the 2nd message from the list of 3 in above inbox page, Im looking for a way to add links to read Previous and Next message when viewing a message page, can anyone tell me how I can achieve this, I have thought about it a lot but have no ideas
here is screenshot of main mail table...