Greetings,
I'm sure there's an answer out there to this question. But I've been
looking for about 2 days and haven't found it yet. Maybe I'm just not
asking the right question.
I need to get X number of "unsold" seats out of a seating table. Order
them by the seat_number. (Seat #1 = closest to the stage)
For example, someome might buy the first 2 seats. Then the next
request is for 4 seats. I need to return seats 3, 4, 5, 6. But if, 3,
4, 5, 6 aren't available together, I need to return the next grouping
of 4 unsold seats. If it helps, here is my seating table:
CREATE TABLE `tt_seats` (
`building_id` int(8) default NULL,
`row_num` int(8) default NULL,
`seat_num` int(8) default NULL,
`seat_status` int(1) default NULL
) TYPE=MyISAM;
seat_status of 0 is unsold or "open". I hope that makes sense. I'm no
MySQL guru, yet... :)
Thanks for your help!
Kilroy