Hi everyone,
please I need your help!!!!!
I have to run a recordset as this following:
room_1 | price_1 | …
room_1 | price_2 | …
room_1 | price_3 | …
room_1 | price_4 | …
room_2 | price_1 | …
room_2| price_2 | …
room_3 | price_1 | …
…
I would like this output:
room_1:
- price_1
- price_2
- price_3
- price_4
- …
room_2:
- price_1
- price_2
- …
room_3:
- price_1
- …
I have this code, but dont work because it give me the title of the room (es. room_1) by every price, so like this...
room_1:
- price_1
room_1:
- price_2
Here the code:
<%sql = "SELECT * FROM price ORDER BY room_id ASC"Set rs = conn.execute(sql)
last_room_output = Cint(-1)
Do until rs.eof
%>
<div class="box_price">
<% If Cint(rs("room_id")) <> last_room_output then %>
<h1 id="idc_<%= rs("room_id") %>"><%=rs("room_title")%></h1>
<div class="clear"> </div>
<% End If %>
<div class="box_t_price">
<div><%=rs("tariffe_title")%></div>
<div class="date">from: <%=rs("price_from")%> to: <%=rs("price_to")%></div>
<div class="price">€ <%=rs("room_price")%></div>
<div class="clear"> </div></div>
<%
rs.movenext
loop
%>
Thanks a lot
Bye
<message edited by last on Friday, January 20, 2012 5:37 AM>