| | |
How to implement check availability in hotel reservation system
![]() |
•
•
Join Date: Sep 2008
Posts: 33
Reputation:
Solved Threads: 0
Hi ppl
I am developing website for my friend's very small resort, please see www.shivgangaresorts.com/dev
this resort have 8 rooms in total and all rooms are of same type so every room is equally priced.
I just need code or logic to check availability of given no. of rooms on given check in and check out dates.
when somebody makes a reservation, details that go in reservation table is:
booking_id
customer name
email
check-in date
check-out date
no. of rooms
Please help this is very critical as i will be integrating paypal also, so there should be no confusions...
thanks in advance
I am developing website for my friend's very small resort, please see www.shivgangaresorts.com/dev
this resort have 8 rooms in total and all rooms are of same type so every room is equally priced.
I just need code or logic to check availability of given no. of rooms on given check in and check out dates.
when somebody makes a reservation, details that go in reservation table is:
booking_id
customer name
check-in date
check-out date
no. of rooms
Please help this is very critical as i will be integrating paypal also, so there should be no confusions...
thanks in advance
•
•
Join Date: Dec 2008
Posts: 175
Reputation:
Solved Threads: 30
You can execute following query to determine whether new reservation for any room is confilicting with existing reservation for that room.
PHP Syntax (Toggle Plain Text)
select * from reservtable where '{$fromdate}' <= check_out_date and '{$todate}'>= check_out_date and room='{$roomno}'
![]() |
Other Threads in the PHP Forum
- Previous Thread: if statement /mysql help please
- Next Thread: DateTime CLASS problem
Views: 1469 | Replies: 3
| Thread Tools | Search this Thread |
Tag cloud for PHP
ajax apache archive array box broken buttons cakephp cart check checkbox class classes cms code combobox cookies curl database date delete directory display download dropdown dropdownlist drupal dynamic echo email error file files folder form forms function functions header href htaccess html image include insert ip java javascript joomla limit link list login loop mail menu methods mlm mod_rewrite multiple mysql order parse password paypal php problem query radio random recursion regex remote rows script search select server session sessions sort source sql string syntax table unicode update updates upload url user validation variable video web website wordpress xml zend






