php mysql 按照指定年月查找数据 数据库create_time为时间戳
$moneyloglist = MoneyLog::where(['user_id' => $this->auth->id]) ->where($where) ->where("FROM_UNIXTIME(createtime,'%Y-%m')='".$time."'") ->order('id desc') ->limit($offset, $num) ->select();
语法:FROM_UNIXTIME(unix_timestamp,format)