Handling dates and times with PHP and MySQL?

0

Hi, I am working with a system based on PHP and Mysql where I need to make loans of x materials with expiration dates (elimination of requests) and time signs for loans, that is, if the loans are not returned in 3 days start charge fines.

I'm new to PHP and this type of systems, if someone can help me to know if I have to do a function that runs every day and do this type of verification and update data or do not know if I understand .

    
asked by Carlos Meza 19.02.2018 в 04:20
source

1 answer

0

PHP has some functions called date , with them you can generate date of your current schedule (date_default_timezone_set ('US')).

I suggest that by inserting each loan into your database, save the date.

Continue to also have the deadline, which would be to calculate the current date plus 3 days or the ones you wanted.

Continue to compare the dates, when you arrive the day that shows you a warning and when you happen to start inserting data in your table of debts.

If you could research about that, I could help you a little more, remember that you must have done research and attempts to achieve what you asked before publishing.

    
answered by 19.02.2018 в 04:41