Multiple Fields in one List box?

Soldato
Joined
13 Feb 2004
Posts
2,656
Location
South Shields
Is it possible to use values from 2 fields in one list box?
I'm creating a cinema booking website in which on of the tables consists of the following fields -

Showing ID (to link to a time in a different table)
Seat 1
Seat 2
Seat 3
Seat 4 etc..

Now as the seats are in their own fields with a true or false value I'm finding it almost impossible to allow their selection via a list box.

I know these details are pretty sketchy but can anybody guide me in the right direction?

I did come up with one idea..

The code to show one field is -
<option value="<%=(rs_scr6seats.Fields.Item("Showing_ID").Value)%>"
<%If (Not isNull((rs_scr6seats.Fields.Item("Showing_ID").Value))) Then
If (CStr(rs_scr6seats.Fields.Item("Showing_ID").Value) = CStr((rs_scr6seats.Fields.Item("Showing_ID").Value)))
Then Response.Write("selected=""selected""") : Response.Write("")%> ><%=(rs_scr6seats.Fields.Item("AA1").Value)%></option>

If I can somehow edit the last line of code to look like the following -

><%=(rs_scr6seats.Fields.Item("AA1"),("AA2"),("AA3"),("AA4").Value)%></option>

Thanks for any advice.. :)
 
Last edited:
I have managed to get the values to be displayed side by side by using the following statement -

><%=(rs_scr6seats.Fields.Item("AA1").Value & rs_scr6seats.Fields.Item("AA2").Value)%></option>

and I changed the .value to .name to allow the use of the name tag applied to the value.

I think I might be battling against something that can't be done.. but I can't think of any other way around it without creating about 60 different table with multiple new relationships :(
 
Its regualr ASP..

Looking at the problem it seems I will actually have to create a table in my database that will hold the all the information for the seats themselves.. along with an ID.

Tis gonna take ages.. :(

The problem that will face me if I keep goin down this road is that the insertion of new data into the database may be tricky..
 
After a large amount of sweating I got the selections to work.. kinda -

While (NOT rs_scr6seats.EOF) AND (rs_scr6seats.Fields.Item("Showing_ID").Value)= 1
%>
<option value= "<%=(rs_scr6seats.Fields.Item("AA1").Value)%>"><%=(rs_scr6seats.Fields.Item("AA1").name)%></option>
<option value"<%=(rs_scr6seats.Fields.Item("AA2").Value)%>"><%=(rs_scr6seats.Fields.Item("AA2").name)%></option>
<option value"<%=(rs_scr6seats.Fields.Item("AA3").Value)%>"><%=(rs_scr6seats.Fields.Item("AA3").name)%></option>
<option value"<%=(rs_scr6seats.Fields.Item("AA3").Value)%>"><%=(rs_scr6seats.Fields.Item("BB1").name)%></option>
<option value"<%=(rs_scr6seats.Fields.Item("AA3").Value)%>"><%=(rs_scr6seats.Fields.Item("BB2").name)%></option>
<option value"<%=(rs_scr6seats.Fields.Item("AA3").Value)%>"><%=(rs_scr6seats.Fields.Item("BB3").name)%></option>

<%
rs_scr6seats.MoveNext()
Wend
If (rs_scr6seats.CursorType > 0) Then
rs_scr6seats.MoveFirst
Else
rs_scr6seats.Requery
End If
%>

you were right.. just needed to add an option for each - D'oh.
Only thing I need to sort now is to make sure that they relate to the info in the database.. lol.
Long night ahead...
 
Back
Top Bottom