Welcome Guest, Not a member yet? Register   Sign In
[SOLVED] Adding Dates To A Set Date
#3

[eluser]defectivereject[/eluser]
Changed my while loop as follows to update the date
Code:
while ($i <= $occurs) {    
            ++$i;    
        $new_date = date("Y-m-d", strtotime($new_date."+7 days"));
        $this->db->query(
            "INSERT INTO calendar2
            (date_t,data_t,reoccurs,time_t)
            VALUES
            ('$new_date', '$data', '$dateto', '$time')");    
    }

No longer using MySQL to add 7 days as it didn't anyhow (!)
and $new_date is the same value as the added_date from before


Messages In This Thread
[SOLVED] Adding Dates To A Set Date - by El Forum - 10-25-2010, 07:38 AM
[SOLVED] Adding Dates To A Set Date - by El Forum - 10-25-2010, 07:51 AM
[SOLVED] Adding Dates To A Set Date - by El Forum - 10-25-2010, 09:04 AM



Theme © iAndrew 2016 - Forum software by © MyBB