KnowledgeHub
Questions
Tags
Users
Search
Alex Rivera
|
Logout
Edit Question
Title
Body
I have two columns in my db: start_date and end_date , which are both DATE types. My code is updating the dates as follows: $today_date = date("Y-m-d"); $end_date = date("Y-m-d"); // date +1 month ?? $sql1 = "UPDATE `users` SET `start_date` = '".$today_date."', `end_date` = '".$end_date."' WHERE `users`.`id` ='".$id."' LIMIT 1 ;"; What is the best way to make $end_date equal to $start_date + one month? For example, 2000- 10 -01 would become 2000- 11 -01.
Tags (comma-separated)
Save Edits
Cancel