MySql获取数据库表中某一年的所有月份

$year = $_POST['year'];
$selMonthSql = "SELECT DISTINCT(DATE_FORMAT(时间列,'%m')) as month FROM orders WHERE 时间列 LIKE '%$year%'";
$monthRes = getRes($selMonthSql);
posted @ 2018-10-19 09:37  LanXiny  阅读(3780)  评论(0编辑  收藏  举报