vendredi 22 juillet 2016

Need to fetch record for each month in MYSQL

I need help to fetch record from the database with some condition as I explain below :- I need to check the student availability for each month between selected startDate and end Date. Table Structure :- Table data :- Example :- Here you can take capacity of classroom as 20 students for example. I want to check the seat availablity from 02/2016 to 04/2017. Output will be : 02/2016 - 20 03/2016 - 19 04/2016 - 18 05/2016 - 15 06/2016 - 20 . . . 02/2017 - 14 03/2017 - 20 04/2017 - 18 thanks in advance for help.

Aucun commentaire:

Enregistrer un commentaire