Chào các bạn! Vì nhiều lý do từ nay Truyen2U chính thức đổi tên là Truyen247.Pro. Mong các bạn tiếp tục ủng hộ truy cập tên miền mới này nhé! Mãi yêu... ♥

Xulyxoa.asp

<html xmlns="http://www.w3.org/1999/xhtml">

<head>

<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />

<title>Untitled Document</title>

</head>

<body>

<!--#include file="connect.asp"-->

<%

ten=request.Form("tent")

gio=request.Form("gioxp")

opencn

set tim=server.CreateObject("ADODB.recordset")

' Tìm mã tàu có tên tàu trong bảng tàu để xóa vé có mã tàu tìm được trên bảng vé tàu

tim.open "select mat from tau where tentau='"&ten&"'",cn,3,3

if tim.recordcount >0 then

matau=tim("mat")

' Xóa những vé táu có mã tàu vừa tìm được ở trên và giờ xp nhập từ bàn phím

cn.execute "delete from vetau where mat='"&matau&"' and gioxp='"&gio&"'"

response.Write("Đã xóa xong !

Danh sách vé tàu

")

set list=server.CreateObject("ADODB.recordset")

list.open "select mavt,tentau,chieudi,dongia,gioxp from vetau inner join tau on vetau.mat=tau.mat",cn,3,3

%>

<table width="698" border="1" cellspacing="0" cellpadding="0">

<tr>

<td width="119">Mã vé </td>

<td width="129">Tàu</td>

<td width="147">Chiều đi </td>

<td width="151">Giá vé </td>

<td width="140">

Giờ xuất phát

</td>

</tr>

<% do while not list.eof %>

<tr>

<td><%=list("mavt")%></td>

<td><%=list("tentau")%></td>

<td><%=list("chieudi")%></td>

<td><%=list("dongia")%></td>

<td><%=list("gioxp")%></td>

</tr>

<% list.movenext

loop

list.close

set list=nothing

closecn

%>

</table>

<% else

response.Write("Khong tim thay ")

end if

%>

</body>

</html>

Bạn đang đọc truyện trên: Truyen247.Pro

Tags: #hieu