0

I have multiple reminder in the table I'm saving that reminder with date range so the reminder will display within that date like this

<table>
    <tr>
 <th>id</th>
 <th>reminder</th>
 <th>start_date</th>
 <th>end_date</th>
    </tr>
    <tr>
 <td>1</td>
 <td>Call to Alex</td>
 <td>2017-09-16</td>
 <td>2017-09-23</td>
    </tr>
    <tr>
 <td>2</td>
 <td>Call to Crame</td>
 <td>2017-09-19</td>
 <td>2017-09-20</td>
    </tr>
</table>

I want to get the data by day for example like below I'm getting the value by current date I don't know how to query by datte in two different columns. Kindly help me to find the solution.

<table>
    <tr>
 <th>date</th>
 <th>reminder count</th> 
    </tr>
    <tr>
 <td>2017-09-16</td>
 <td>1</td> 
    </tr>
    <tr>
 <td>2017-09-17</td>
 <td>1</td> 
    </tr>
    <tr>
 <td>2017-09-18</td>
 <td>1</td> 
    </tr>
    <tr>
 <td>2017-09-19</td>
 <td>2</td> 
    </tr>
    <tr>
 <td>2017-09-20</td>
 <td>2</td> 
    </tr>
    <tr>
 <td>2017-09-21</td>
 <td>1</td> 
    </tr>
    <tr>
 <td>2017-09-22</td>
 <td>1</td> 
    </tr>
    <tr>
 <td>2017-09-23</td>
 <td>1</td> 
    </tr>
    <tr>
 <td>2017-09-24</td>
 <td>0</td> 
    </tr>
</table>
Abdullah Ahamed
  • 63
  • 3
  • 11
  • actually where you need help in php/html/mysql. You mentioned html code and tagged as mysql.. if you need help in mysql please write your sql and seek help – Shibin Raju Mathew Sep 16 '17 at 07:26
  • See https://meta.stackoverflow.com/questions/333952/why-should-i-provide-an-mcve-for-what-seems-to-me-to-be-a-very-simple-sql-query – Strawberry Sep 16 '17 at 08:00

0 Answers0