Good day!

I just want a little help on how to get all data from mysqltable where month=january or feb.. etc. and year =2015 or maybe 2014

I have a table with datefield(yyyy-mm-dd) example dates data are:
2015-01-17
2015-02-17
2014-12-17
2014-10-17
2014-03-17

And I have a span list of months like
January
February
March
...
..
..

And a year that is sotre in a var $selectedyear;

Thank you for helping..!

Have a look at the MySQL YEAR() and MONTH() functions.

thank you pritaeas..got it working with year() and month() function!

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.