mysql - 请问数据库字段为年月日,传进的参数为月,怎么查询那个月所对应的数据
迷茫
迷茫 2017-04-17 16:50:28
0
1
1033
迷茫
迷茫

业精于勤,荒于嬉;行成于思,毁于随。

reply all(1)
伊谢尔伦
select * from table WHERE date_format(date,'%Y-%m') = '2017-3'

If you need to add the year in front, you can use the database function date_format
For the format, please refer to this article
http://blog.csdn.net/kangbrot...

Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!