I am trying to get some record from table for specific month and year and I have only complete date field.

In the above image I want to select the data from date but only for (2015-09)
E.g.:
SELECT * FROM attendance WHERE date = (year-month)
You can use year and month function:
SELECT * FROM attendance WHERE year(`date`) = '2015' and month(`date`) = '9'
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With