在线预订系统,将信息从一页加载到另一页 [英] Online booking system, loading info from one page to another

查看:71
本文介绍了在线预订系统,将信息从一页加载到另一页的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

大家好.我真的被一件事卡住了.我实际上正在开发一个在线预订的小型住宿网站.我有个问题.我需要sql代码来显示可用的房间.
这是场景:
我们在主页上.用户选择入住和退房日期,然后选择搜索可用的房间.我想在另一个页面中加载可用的房间.
任何帮助都将受到欢迎

这是我的桌子

预订表:
reservId
clientId
employeeId
roomNumb
dateIn
dateOut

房间表:
roomNumb
roomtypeID
roomRate
地板

房间类型表
roomtypeId
roomType
numberOfPersons

Hello guys. I got really stucked on one thing. I am actually developing an online website booking for a small accommodation. I have a problem. i need the sql code to display the rooms available.
here is the scenario:
we are on the home page. the user select the checkin and checkout date and then he clic search for the room available. I want to load the available rooms in another page.
Any help would be the welcome

here are my tables

reservation table:
reservId
clientId
employeeId
roomNumb
dateIn
dateOut

room table:
roomNumb
roomtypeID
roomRate
floor

roomtype table
roomtypeId
roomType
numberOfPersons

推荐答案

所以...如果房间的可用性是由numberOfPersons决定的,那么您应该使用该字段来区分寄存器并仅显示完成注册的寄存器.该领域的特定规则...

然后重新了解如何选择数据库中的某些值,您应该看到如何使用选择子句 [ ^ ].

以及如何指定条件 [
So... if the room availability is determined by numberOfPersons, then you should use that field to discriminate the registers and to show only the ones that accomplish a specific rule on that field...

Then reagrding how to select some values in a database, you should see How to use select clause[^].

And how to specify a condition[^] for the select clause.

Once you''ve done that you will get the result you are after.

Then you''ll have to store that result into a recordset in order to work with it.

Try it and come back with details.

Good luck!


这篇关于在线预订系统,将信息从一页加载到另一页的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆