摘要: 按年汇总,统计:select sum(mymoney) as totalmoney, count(*) as sheets from mytable group by date_format(col, '%Y');按月汇总,统计: select sum(mymoney) as totalmoney, 阅读全文
posted @ 2017-06-30 15:34 cuculus 阅读(5161) 评论(0) 推荐(0)
摘要: 本来我是用自定义定义一个类,然后设置了样式 感觉挺麻烦的 一直用不了.弄的烦的,直接索性就修改了一下源码..稍微捣鼓的 不要喷 ,适合新手,,第一步:css引入:.pagelist {padding:10px 0; text-align:center;}.pagelist span,.pagelis 阅读全文
posted @ 2017-06-30 14:53 cuculus 阅读(869) 评论(0) 推荐(0)
摘要: 1 10 // +---------------------------------------------------------------------- 11 12 namespace think\paginator\driver; 13 14 use think\Paginator; 15 use think\Config; 16 class Bootstrap ... 阅读全文
posted @ 2017-06-30 14:52 cuculus 阅读(4213) 评论(0) 推荐(0)
摘要: 最近在做一个类似发帖的模块,要显示例如:几秒前,几分钟前,几天前等的功能,使用的TP5,写了个公共函数,代码如下: 在控制器中调用公共函数: 阅读全文
posted @ 2017-06-30 10:02 cuculus 阅读(892) 评论(0) 推荐(0)