I am developing a book/library app. I want to give users the option of 'reserving' a book until the following working day (5pm). After this the book should become available again, that is another question for another day!
Currently once the user clicks 'Reserve' I insert a number of records into my 'borrow_request' table. These are as follows;
borrow_id
book_id
user_id
date_request
date_expire
My date_request variable is;
$date_request = date("Y-m-d H:i:s");
How can I insert a date_expire
variable and increment it by one working day?
The next step I will investigate is how to reset the date_expire
after one working day, possibly a cron job?
Quite new to php/mysql here so any advice is appreciated.