lucky3809 Posted October 5, 2010 Share Posted October 5, 2010 Cant find what im looking for in this forum maybe someone can help or direct me to a site that would help me out lol. Iam trying to add the count of mail, that says something along the lines... " Diplaying 1-10 mails of 20 in your mailbox." I know how to get the 20 part that is total_items. the part I cant seem to get is the 1-10 and how to calculate that for the next page to read "Displaying 10-20 mails of 20 in your mailbox." would this be something along the lines of the Selecting count query? or math as in $limit*$mail_id? Quote Link to comment Share on other sites More sharing options...
Rasheed saeed Posted October 5, 2010 Share Posted October 5, 2010 Isn't this already displayed in the Mailbox.php? Quote Link to comment Share on other sites More sharing options...
lucky3809 Posted October 5, 2010 Author Share Posted October 5, 2010 Not in mine I recoded the mail php it didnt have pagination... And the original one only said it can only display 25 mails. Quote Link to comment Share on other sites More sharing options...
Dave Posted October 5, 2010 Share Posted October 5, 2010 Well if you have some form of pagination.. and your only displaying 10 messages you could do something like <?php $num1 = ($_GET['page'] == 1 OR !$_GET['page'] ? 1 : ($_GET['page']*10-10)); $num2 = ($_GET['page'] ? ($_GET['page']*10) : 10); echo 'Viewing mail '.$num1.' to '.$num2; ?> I honestly have no idea if this is going to work because I've been working with C++ for the past few days.. but I believe it should. (And just incase.. it wont work if you just shove it in your script.. you need to modify it a bit.) Quote Link to comment Share on other sites More sharing options...
lucky3809 Posted October 5, 2010 Author Share Posted October 5, 2010 Thank you Dave that did work!! :-) Quote Link to comment Share on other sites More sharing options...
Dave Posted October 5, 2010 Share Posted October 5, 2010 Thank you Dave that did work!! :-) Glad to be of service ;) Quote Link to comment 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.