Jump to content

Recommended Posts

Hi

 

I have a small holiday cottage business that im starting up, and am in the process of designing a website that will allow the customers to book online.

 

I have created the tables for the database in MySQL and am going to use php to link the forms to the database.

 

I believe i need a query to query the database in order to prevent double bookings .

 

I have started a query: select gite_id, date_checkin, date_checkout(date_checkin-date_checkout)/1000000 from reservation;

 

i need to get this query to query the database in php or something to allow the customer to identify if the cottage is booked or not.

Any ideas on how i can elaborate this.

 

Any ideas are more than appreciated

 

Jason

 

[attachment deleted by admin]

What I did for my reservation system was plug in a value if a reservation was made for that day, instead of trying to checkin/checkout type of compare.

 

So if they book it for 4 days, mark those 4 days as being booked, then you can check each day and see if it's available.

 

Hope that makes sense.

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.