How to add missing date month year in mysql (php)

Hi 

I have tried many solutions with MySQL but at the end, i found solution with PHP
which  is best 


$begin = new DateTime('2016-01-20');
$end = new DateTime('2017-12-10');

while ($begin <= $end) {
    echo $begin->format('Y-m'), "n";
    $begin->modify('first day of next month');
}

add event on dynamic content in jquery

Code Snippets

Try Event Delegation:
$(document).on("change", "#Sites", function(){
    var siteId = this.value;
    GetSectors(siteId);  
});

SQL date format convert? [dd.mm.yy to YYYY-MM-DD]

Since your input is a string in the form 03.09.13, I'll assume (since today is September 3, 2013) that it's dd-mm-yy. You can convert it to a date using STR_TO_DATE:

STR_TO_DATE(myVal, '%d.%m.%y')

Then you can format it back to a string using DATE_FORMAT:

DATE_FORMAT(STR_TO_DATE(myVal, '%d.%m.%y'), '%Y-%m-%d')

Note that the year is %y (lowercase "y") in STR_TO_DATE and %Y (uppercase "Y") in DATE_FORMAT. The lowercase version is for two-digit years and the uppercase is for four-digit years.