Welcome, Guest: Register On Nairaland / LOGIN! / Trending / Recent / New
Stats: 3,207,678 members, 7,999,925 topics. Date: Monday, 11 November 2024 at 04:48 PM

Problem With Online Booking Application - Programming - Nairaland

Nairaland Forum / Science/Technology / Programming / Problem With Online Booking Application (994 Views)

I'm Having A Problem With This Qbasic. Who Can Help? / Problem With Insert Statement Mysql (2) (3) (4)

(1) (Reply) (Go Down)

Problem With Online Booking Application by ace1(m): 4:53pm On Oct 12, 2015
Good Day house, I'm currently building an online hotel booking application in php but I'm having small challenges. This is where the problem is, I want the booking cancelled and the room available for booking if payment isn't made 48hours after the time the booking was made. How do I achieve this?
Re: Problem With Online Booking Application by fsho(m): 5:47pm On Oct 12, 2015
If your app is using Mysql, just create a timestamp variable alongside the booking Information or in a new table. Also create a status variable for (Paid,unpaid) on the same database.

Then poll the database for changes.

Cheers!
Re: Problem With Online Booking Application by ace1(m): 6:21pm On Oct 12, 2015
fsho:
If your app is using Mysql, just create a timestamp variable alongside the booking Information or in a new table. Also create a status variable for (Paid,unpaid) on the same database.

Then use javascript to poll the database for changes.

If this is not clear:

Search for "date programming in php"

You'll get different alternatives and ideas.

Cheers!

i have a column for status and booking_date already. The Javascript part is what I don't really get. can u please explain further
Re: Problem With Online Booking Application by mj(m): 4:26pm On Oct 13, 2015
ace1:
Good Day house, I'm currently building an online hotel booking application in php but I'm having small challenges. This is where the problem is, I want the booking cancelled and the room available for booking if payment isn't made 48hours after the time the booking was made. How do I achieve this?

On each Booking create a Timestamp in a column on your database table and Mark the Payment Status as PENDING.

Create a Cron Job that runs lets say every 5 mins. The cron script will go to the database table and select records where Payment Status is Pending. The script will now compare the current time and the time on the Timestamp column, if it is more than 48Hours, Booking will be cancelled.

1 Like

Re: Problem With Online Booking Application by ace1(m): 2:16pm On Oct 14, 2015
mj:


On each Booking create a Timestamp in a column on your database table and Mark the Payment Status as PENDING.

Create a Cron Job that runs lets say every 5 mins. The cron script will go to the database table and select records where Payment Status is Pending. The script will now compare the current time and the time on the Timestamp column, if it is more than 48Hours, Booking will be cancelled.

Thanks you very much. Let me do that

(1) (Reply)

Nollywood Sat Is Missing On My DVR. How Do I Fix It? / Urgent Vacancy / Powerful Ways To Earn From Blogging Without Google Adsense

(Go Up)

Sections: politics (1) business autos (1) jobs (1) career education (1) romance computers phones travel sports fashion health
religion celebs tv-movies music-radio literature webmasters programming techmarket

Links: (1) (2) (3) (4) (5) (6) (7) (8) (9) (10)

Nairaland - Copyright © 2005 - 2024 Oluwaseun Osewa. All rights reserved. See How To Advertise. 10
Disclaimer: Every Nairaland member is solely responsible for anything that he/she posts or uploads on Nairaland.