PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!
SELECT DATE_ADD(NOW(), INTERVAL 1 DAY);
#I modified this to use now instead of the string date
Since you didn't tell us your error I can only assume your error is a syntax error, which it appears to be with the way you are incorrectly using the INTERVAL with DATE to add. You also did not mention your MySQL version so I am not sure if you are running 3, 4 or 5, although both DATE_ADD and ADDDATE are supported since 3.23/4.1.
A search of the MySQL manual would certainly be helpful in this situation.
PS Please use descriptive titles when posting threads in our forums. It helps us help you better. Thanks.
$sql = "INSERT INTO users(username,password,name,email,upgrade) VALUES('$username','$pass','$fullname','$email', DATE_ADD(CURRENT_DATE, INTERVAL 15 DAY))";
In my computer there's MySQL 5 version I think and in my server (hosting) there's 4.1 version. On my computer this query gives me errors, that there are some problems in syntax. I tried to upload into server and run it and it works I've always looked at 4.1 version reference and tried to run script on my computer. That's why I always got this error
Ok arukomp, help us help your. On the system that is failing, please tell us the exact error message you are getting back AND do a echo $sql; so we can the exact SQL command that the database is seeing. That would go a long way in helping us figure out this issue for you.