The date is stored at mysql DB like this:
| id | name | time | refno |
+------+-----+----------------------+--------
| 123 |Davids| 2000-07-11 15:14:52 | 199 |
| 123 |Davids| 2001-07-11 15:14:52 | 199 |
| 123 |Davids| 2001-07-11 11:04:53 | 299 |
| 123 |Davids| 2001-08-11 12:06:56 | 399 |
| 123 |Davids| 2001-09-11 16:24:08 | 499 |
I want to draw out the data of same month and year.
select * from XXX where id = \'123\' and time = \'??????\';
Help me plz~~thank you.