I have a table with ID (auto inc) and DATETIME.
I have been sending the date/time to mysql with $thedate=date(“Y-m-d-h-m-s”);
Now I need to find all customers who have not placed an order for 4 days say. What is the best way to do this?
Should I have used a different column type to store the information? This “listing all customers who have not ordered in last 4 days” is the only thing it is used for.
OMG…
$thedate=date("Y-m-d-h-m-s")is wrongly formattedshould be
$thedate=date("Y-m-d-H-i-s")to get customer who has not place an order in last 4 days