Building a queue for DVDs
My current project is building a DVD database on my Website for friends and family to see what current movies I have and request to borrow them. I have built several forms for searching the database and adding new records to the database. I am only allowing 4 movies "checked out" at a time. Now I want to build a queue like what they have on Netflix.com so that if someone has 4 movies already checked out, they can still request others that will be put into a queue and when they return a movie the next one will be pulled for them. I am not sure where to start with this. Can anyone help with this?
Cori
Suzanne posted this at 19:27 — 20th May 2004.
She has: 5,507 posts
Joined: Feb 2000
Similar to what's checked out, you would have a lookup table of user+dvd and they can add or delete from that table when they add/delete from their list or queue.
So:
user | dvd_id
---------------
1 | 1
2 | 2
2 | 4
2 | 12
1 | 3
1 | 4
cgacfox posted this at 17:15 — 22nd May 2004.
She has: 15 posts
Joined: May 2004
So I would build a table in my database and populate it with the names of the people I know are borrowing DVDs from me. I have built in the ability for the check out page to send to the database the name of the person requesting to borrow a movie. Would I just add to that code for the queue table or do I need to build another cfm page for that to work?
Suzanne posted this at 19:41 — 22nd May 2004.
She has: 5,507 posts
Joined: Feb 2000
You should have three tables (at least).
1. Users
2. DVDs
3. Queue (lookup table of users/dvds)
Ideally you wouldn't use the person's name, nor the name of the DVD, but rather their unique id number.
Want to join the discussion? Create an account or log in if you already have one. Joining is fast, free and painless! We’ll even whisk you back here when you’ve finished.