如何搜索两个表 [英] How to search two tables
本文介绍了如何搜索两个表的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我有以下表格
预订表
I have this tables below
Reservation Table
CheckInDate datetime Unchecked
CheckOutdate datetime Unchecked
NoOfDays int Unchecked
RoomId int Unchecked
Booking_Charges float Unchecked
NoOfAdults int Checked
NoOfKids int Checked
房间表
room Table
RoomId int Unchecked
RoomType varchar(50) Unchecked
我的 default.aspx
我有这个:
on my default.aspx
I have this:
<asp:TextBox ID="TxtCheckIn" runat="server" >
<asp:TextBox ID="TxtCheckout" runat="server" >
但它使用日历控件...
我的目的是搜索可用的房间....如在预定的特定日期获取预订表中的房间
我如何实现这一目标...
提前致谢
but it uses calendar control...
My Aim is to search the available rooms....as in to get the rooms that is not in reservation table at the particular date selected
How can i achieve that...
Thanks in advance
推荐答案
您好,
您需要创建一个包含所有日期的表格(日期)。然后从日期表中选择它们不在预订表中的所有日期。
Hi,
You need to create a table (dates) with all dates. Then you select all dates from the dates table where they are not in the reservations table.
这篇关于如何搜索两个表的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文