随笔分类 - thinkphp
tp类型
摘要:thinkphp5示例: //子查询主要的在MAX(create_time) $subQuery = Db::table('fa_crm_record') ->field('customer_id,MAX(create_time) AS create_time') ->group('customer
阅读全文
摘要:使用btn-addtabs新选项卡打开之后如何关闭或者返回 `返回上一层` <a onclick="window.top.location.href = '你返回的路径url,或者用js事件获取上层路径'" href="javascript:"><i class="fa fa-arrow-left"
阅读全文
摘要:如果你的表是按年份命名的,例如 table_2021, table_2022, table_2023, table_2024, table_2025,你可以考虑使用分区查询来优化查询性能 SELECT * FROM table_2021 UNION ALL SELECT * FROM table_2
阅读全文
摘要:<?php //根据日期来统计所消耗的点数 //模型的使用方法 $result = $model ->field("id,FROM_UNIXTIME(createtime,'%Y-%m-%d') as `createtime`,sum(price) as count_price") ->group(
阅读全文
摘要:$arr = [ [ 'id' => 123, 'test' => ['id' => 2, 'title' => "测试",'test3'=>['list'=>123]] ] ]; $field = "test.test3.list"; foreach($arr as $k=>$v){ $resul
阅读全文
摘要:
**先在本项目里导入** `composer require phpoffice/phpspreadsheet` 点击查看代码公用类 ``` data;//导出的数据 if(!$arr){ return false; } //实例化 $objExcel = new Spreadsheet(); //
阅读全文
**先在本项目里导入** `composer require phpoffice/phpspreadsheet` 点击查看代码公用类 ``` data;//导出的数据 if(!$arr){ return false; } //实例化 $objExcel = new Spreadsheet(); //
阅读全文

浙公网安备 33010602011771号