You must generate the dates that are between your start and end date, go through them and make the insert in the bd, I leave you an example:
PHP
// tus datos de entrada
$start = '2018-11-01';
$end = '2018-11-08';
// generas las fechas entre el periodo
$end = new DateTime($end); // éstas 2 lineas son necesarias para que DatePeriod incluya la ultima fecha
$end->modify('+ 1 day');
$period = new DatePeriod(
new DateTime($start),
new DateInterval('P1D'), $end);
// recorres las fechas y haces tu insert
foreach ($period as $key => $value) {
$date = $value->format('Y-m-d');
// genera tu sql
$sql = "INSERT INTO tabla ('fecha', '..') VALUES ('$date', '..')";
//echo $sql.'<br>';
// ejecuta el sql (insert)...
}
Ex. of the generated sql:
INSERT INTO tabla ('fecha', '..') VALUES ('2018-11-01', '..')
INSERT INTO tabla ('fecha', '..') VALUES ('2018-11-02', '..')
INSERT INTO tabla ('fecha', '..') VALUES ('2018-11-03', '..')
INSERT INTO tabla ('fecha', '..') VALUES ('2018-11-04', '..')
INSERT INTO tabla ('fecha', '..') VALUES ('2018-11-05', '..')
INSERT INTO tabla ('fecha', '..') VALUES ('2018-11-06', '..')
INSERT INTO tabla ('fecha', '..') VALUES ('2018-11-07', '..')
INSERT INTO tabla ('fecha', '..') VALUES ('2018-11-08', '..')
The proposed code works if both dates are the same and also if they are not.
Link to the official documentation on the use of DatePeriod: link