Getting the right paging page

A

Astra

Hi All

This might be a easy one, but my brain's gone numb!!

Basically I have created a newsletter system that meta refreshs the
page 'x' amount of times to query and email batches of news letters.

This all works fine, but I want to control the problem of the user
inadvertantly quitting the browser half way through the process or
more likely their dial-up connection knocking off.

I think I am on the brink of cracking this, but my maths is letting me
down.

So for your delictation, here is the info:

1) I query the DB so that I have the total number of subscribers.

2) I query the DB so that I know how many batches (items on a page) I
am dealing with.

3) I query the DB so that I know how many have already been sent.

What I need to do now is send the 'page no' that I am upto to my
emailing procedure.

A nice easy example is:

I have 38 subscribers and I send them in batches of 5. The system
sent 2 batches (10) and crashed so now I need to start from
batch/paging number 3.

How do I work out the paging number I need from the info that I have?

Rgds

Robbie
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
474,079
Messages
2,570,574
Members
47,207
Latest member
HelenaCani

Latest Threads

Top