My Code:
<%
while not rs.eof
A1_pnr = rs("A1_pnr")
'response.write "A1_pnr = " & A1_pnr & "<br>"
set rs4=con.execute("select count(trip_id) from trip_details where trip_id like '%"& A1_pnr &"%'")
'response.write "" & ("select count(trip_id) from trip_details where trip_id like '%"& A1_pnr &"%'") & "<br>"
set rs5=con.execute("select no_of_pass from trip_cost where trip_id like '%"& A1_pnr &"%'")
'response.write "" & ("select no_of_pass from trip_cost where trip_id like '%"& A1_pnr &"%'") & "<br>"
trip_id = rs4("trip_id")
'response.write "Trip ID = " & trip_id & "<br>"
count_trip_id = rs4("count(trip_id)")
'response.write "Count TRIP ID = " & count_trip_id & "<br>"
number_of_passengers = rs5("no_of_pass")
'response.write "Number of Passengers = " & number_of_passengers & "<br>"
segments = cdbl(count_trip_id)*cdbl(number_of_passengers)
'response.write "Segments = " & segments & "<br>"
%>
<tr bordercolor="#ececec" bgcolor="#ececec">
<td align="center">
<%=rs("A1_pnr")%>
</td>
<td align="center">
<%=rs("leadname")%>
</td>
<%
smouse=rs("Destination_Arrival_Time")
smouse2=rs("Destination_Arrival_Date")
set rscount=con.execute("select count(trip_details.trip_id) from trip_details INNER JOIN trip_master on (trip_details.trip_id = trip_master.trip_id) where trip_master.regular_trip = 'Confirmed'")
total_segments = rscount("count(trip_details.trip_id)")
'response.write "Total Segments = " & total_segments & "<br>"
'total_segments = ("select count(trip_details.trip_id) from trip_details INNER JOIN trip_master on (trip_details.trip_id = trip_master.trip_id) where trip_master.regular_trip <> 'Cancelled'")
'response.write "Total Segments = " & total_segments & "<br>"
'response.write "" & ("select count(trip_details.trip_id) from trip_details INNER JOIN trip_master on (trip_details.trip_id = trip_master.trip_id) where trip_master.regular_trip <> 'Cancelled'") & "<br>"
%>
<td align="center">
<%=rs3("dep_airport")%>
</td>
<td align="center">
at <%=smouse%>" onmouseover="style.cursor='hand'"><%=rs("Destinati on_Airport")%>
</td>
<td align="center">
<%=segments%>
</td>
<td align="center">
<%=rs5("no_of_pass")%>
</td>
<% if rs("regular_trip") = "Cancelled" then %>
<td align="center">
<b><%=rs("regular_trip")%></b>
</td>
<% else %>
<td align="center">
<%=rs("regular_trip")%>
</td>
<% end if ' if rs("regular_trip") = "Cancelled" %>
</tr>
<%
rs.movenext
'response.write "Segments = " & segments & "<br>"
'segments_total = cint(segments)
'segments_total = ("select count(trip_id) from trip_master where regular_trip = 'Confirmed'")
'response.write "Segments = " & segments_total & "<br>"
wend
'response.write "A1 PNR = " & A1_pnr & "<br>"
%>
|