how to get next month's date and it's not related to current month date in MySQL

207
August 07, 2017, at 4:16 PM

I have three columns in my table, future 3 months like fistdate(next month), secondate(+2 next month) and thirdate(+3 next month) which are DATE types. I want to save my dates as follows 09/09/2017, 09/10/2017 and 09/11/2017 and current month is 07/08/2017 and above 3 dates are not related to current month date like 07/08/2017

I have tried following code but it is related to current month

$date1 = date('Y-m-d', strtotime('+1 month'));
    $date2 = date('Y-m-d', strtotime('+2 month'));
    $date3 = date('Y-m-d', strtotime('+3 month'));
     $install = array(
        "invoiceid"              =>$this->input->post('salesInvoiceno', TRUE),
        "fistdate"               =>$date1,
        "secondate"              =>$date2,
        "thirdate"               =>$date3
    );
Answer 1

$time = strtotime("2010-08-06");$date1 = date('Y-m-d', strtotime('+1 month',$time));$date2 = date('Y-m-d', strtotime('+2 month',$time));$date3 = date('Y-m-d', strtotime('+3 month',$time));echo $date1.' '.$date2.' '.$date3;

READ ALSO
SoftDelete php5 without framework [on hold]

SoftDelete php5 without framework [on hold]

hello how can I use SoftDelete in php5 without frameworkI need to delete a line from database but not physical

256
$1 $2 values are not getting used properly in .htaccess file [on hold]

$1 $2 values are not getting used properly in .htaccess file [on hold]

We have ahtaccess file with following contents RewriteEngine on RewriteBase /

156
Filter by params in eshop and recalculation how many items remains

Filter by params in eshop and recalculation how many items remains

I have a eshop, where customers can filter by params (color, size, sex,

162
Laravel new doesn't work in my local environment

Laravel new doesn't work in my local environment

I'm trying to create a new laravel app, but when I use the command "laravel new" I've got an error :

277