I want to add 30 days to mysql date row

后端 未结 4 962
故里飘歌
故里飘歌 2021-01-27 02:50

My Code.

    

        
4条回答
  •  一向
    一向 (楼主)
    2021-01-27 03:06

    Try this:

        $sql="INSERT INTO users (first_name, last_name, web, email, date)
        VALUES ('$Fname', '$Lname', '$web', '$email', '$date', DATE_ADD(NOW(), INTERVAL 30 DAY))";
    
        $result = mysql_query($sql); 
    
    >> you are adding date after query executes, but do the same when query executes.
    
    • Thanks

提交回复
热议问题