0

How to count days using php mysqli

Guya i have a task. Please help me to solve this problem Problem is, a customer cannot reserve more then 3 products. Means if user reserved 3 product then system will not allow user to reserve mire then 3 products for next 3 days. Please help me how to do this?

9th Apr 2021, 9:15 PM
Ali Irtaza
Ali Irtaza - avatar
2 Antworten
+ 1
If you have some MySQL tables already to store the customers, products, and customer_product_reservations, can you share their details like table names or fields? If you show results from statements like "show create table customer;", that would be even better. You're focusing specifically on a PHP script that stores(SQL insert) or rejects a request to store a new product reservation for a specific customer, right?
9th Apr 2021, 11:18 PM
Josh Greig
Josh Greig - avatar
+ 1
Ali Irtaza You can get days difference between two dates. So you can check from current date and reserved date but what if user reserved 3 products on different date?
10th Apr 2021, 4:33 AM
A͢J
A͢J - avatar