Greetings,
I've been working on a project for my church for a couple of weeks.
We're going to be selling tickets to our events and we need to look
for available seats in our hall.
I have a query that returns to me all the seats that are available,
which is great but the ideal solution would be to return X number of
seats based on a seatnum (Integer).
For example, if seats 10, 11, 12 and 15-20 are available and I need 4
of them, I should get back seats 15,16,17,18.
I'm pretty sure that some sort of IF statement with a variable in the
query is the answer, but I can't seem to push through on it.
NOTE: seatnum is NOT a primary key and is not autoincrement. An
autoincrement col wouldn't work for this project as the sections, rows
and seats might get edited as things change in the hall. So I'm doing
the seat numbering myself.
If anyone could give me shove in the right direction, I'd appreciate
it. After many Google searches for "sequential" rows or records and
the like, all I get are people wanting to return record counts.
Thanks much! I'm going to keep plugging away at it and if I figure it
out, I'll post it here.
RK