I have a database with some tables from a restaurant and users can see if they are free of reserved. If free they cand book that table.

Now, my question is this: What can i do so that after (let's say 1 day (or any amount of time) after the booking was made to auto change tofree.

Recommended Answers

All 2 Replies

I'm not sure exactly what you are trying to accomplish but if you need to run a program on a timed basis, then you need to have a look at Cron. It's usually available on most servers.

If you can't do Cron, you can also have a small script that runs on each page load and checks the time vs. the time it was last run (probably keep in a database table). If the time is more than 1 day after the last time it was run, then include the script you want to run.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.