I'm trying to get a number of days of multiple results between dates and insert into a table from the same table. I have a table with the following:
|ID|openDate |closeDate|resultDays|
|1 |2018-05-05|2018-10-10|158 |
|2 |2018-10-07|2018-10-12|5 |
------------------------------------
This result I got in the mysql terminal, with the following structure
mysql> update newdbtable set resultDays = datediff(closeDate, openDate);
How could I populate the resultDays column of every date using php?