Determining active dates for queued items?

F

FrankEBailey

Hi,

I have a limited number of ad slots on my website, let's say there are
5. I have lots of people wanting to advertise in those slots, let's
say there are 100. They each join the queue for an ad slot on a first-
come, first-served basis. I have been trying to find a way to
determine the active date for a queued item. For the first five items
in the queue it's easy, it's just the expiry date of the item in a
live slot that expires first. For the next five queued items it's
still easy, because it's just the expiry date of the item in the queue
that will expire first. HOWEVER, after that it becomes more complex,
because the queued items will continually be slotting into live slots
as live items expire. So my question is, is there a straightforward
way, in ASP, of determining the active date for a queued item in a
queue of arbitrary size?

Any and all help or suggestions appreciated.

Thanks in advance!
 
B

Bob Barrows [MVP]

FrankEBailey said:
Hi,

I have a limited number of ad slots on my website, let's say there are
5. I have lots of people wanting to advertise in those slots, let's
say there are 100. They each join the queue for an ad slot on a first-
come, first-served basis. I have been trying to find a way to
determine the active date for a queued item. For the first five items
in the queue it's easy, it's just the expiry date of the item in a
live slot that expires first. For the next five queued items it's
still easy, because it's just the expiry date of the item in the queue
that will expire first. HOWEVER, after that it becomes more complex,
because the queued items will continually be slotting into live slots
as live items expire. So my question is, is there a straightforward
way, in ASP, of determining the active date for a queued item in a
queue of arbitrary size?

Any and all help or suggestions appreciated.

Thanks in advance!

How is the expiry date determined? Are you storing the amount of time
purchased and adding that to the active date? I assume the amount of timed
purchased can vary ... What unit of time is sold? And is there a minimum
purchase?
I assume you are storing this stuff in a database. Can you give us an idea
of the table structure and what type and version of database you are using?
 

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

Forum statistics

Threads
473,764
Messages
2,569,564
Members
45,039
Latest member
CasimiraVa

Latest Threads

Top