Current location: Hot Scripts Forums » Other Discussions » Database » MsAccess Query


MsAccess Query

Reply
  #1 (permalink)  
Old 04-18-11, 10:22 AM
yashman yashman is offline
New Member
 
Join Date: Apr 2011
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
MsAccess Query

Hi,

I am finding difficulty in one of the script in MsAccess. I have

- Venue Table like XYZ Auditorium
- Floor Table - Balcony
- Floor Seat table like A, B
- Seat Number table with values like 01, 02
- Category table like CAT A with category price.
- Category Seat Relation table which links the Category table and Floor Seat Table (above)

- Event table which has a Foreign Key of Venue table
- Temp_Cart table which stores the Category ID, NumOfTickets etc.
- Temp_Cart_Seats with FK_Temp_CartID and the Seat Number Table ID. This table is used when the customer purchases the ticket for event. The table stores Seat Number IDs which the customer has booked for the event.

Now the issue is that I have 2 Events hosted in the same venue at different dates with same seating arrangement but definitely Category per event will vary. Let's assume

Customer A booked 5 seats for Event A for CAT A each ticket then the values in the tables.
CAT A price of $100 each applies to seats from A01 to A10.

# Temp_Cart
- PK_TempCartID = 1
- CategoryID = 1
- NoOfTickets = 5

# Temp_Cart_Seats
- PK_TempCartSeatsID = 1
- FK_TempCartID = 1
- FK_SeatNumberID = 1

- PK_TempCartSeatsID = 2
- FK_TempCartID = 1
- FK_SeatNumberID = 2

- PK_TempCartSeatsID = 3
- FK_TempCartID = 1
- FK_SeatNumberID = 3

- PK_TempCartSeatsID = 4
- FK_TempCartID = 1
- FK_SeatNumberID = 4

- PK_TempCartSeatsID = 5
- FK_TempCartID = 1
- FK_SeatNumberID = 5

For the first event, since first customer has booked 5 tickets, then the balance ticket count shown to next customer will be 5 which is fine. But for the Next Event which may happen in future date in the same venue shows only 5 instead of showing total of 10 as for this show none of the tickets have been booked in system.

Can anyone help please on this as it is urgent.
Reply With Quote
Reply

Bookmarks


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Any Restriction to number of query...? hakeem PHP 5 11-21-08 06:00 PM
WHY..is this only adding 1 half of the query to my Database? davestar057 PHP 1 03-13-08 01:38 PM
code problem throws error matt001 ASP.NET 0 10-23-05 03:30 AM
Declared Functions skipper23 PHP 4 12-17-03 10:06 AM
index page not showing up skipper23 PHP 3 12-15-03 01:10 PM


All times are GMT -5. The time now is 05:16 PM.
vBulletin® Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.