摘要: str_to_date(date_str, '%Y-%m-%d %H:%i:%s') 替换为 substring_index(date_str, '.', 1); str_to_date(date_str, '%Y-%m-%d') 替换为 substring_index(date_str, ' ', 阅读全文
posted @ 2021-07-21 11:42 何亮1 阅读(167) 评论(0) 推荐(0) 编辑
摘要: 设置临时内存: COMPOSER_MEMORY_LIMIT=-1 composer require 切换国内镜像: composer config -g repo.packagist composer https://packagist.phpcomposer.com 阅读全文
posted @ 2021-07-28 11:43 何亮1 阅读(80) 评论(0) 推荐(0) 编辑
摘要: SHOW COLUMNS FROM tbl_desc WHERE lower(Field) NOT IN ('id'); GROUP_CONCAT: group后连接同一列数据 CONCAT, CONCAT_WS: 连接不同列数据 取前3,4,5条数据: select * from t_book t 阅读全文
posted @ 2021-07-23 17:38 何亮1 阅读(17) 评论(0) 推荐(0) 编辑
摘要: 轮廓: border, outline p1>p+p: p1下面的子p元素,不包含第一个 阅读全文
posted @ 2021-07-23 16:04 何亮1 阅读(11) 评论(0) 推荐(0) 编辑
摘要: git diff HEAD~1 HEAD~2 --stat(隐藏详细信息) 阅读全文
posted @ 2021-07-23 15:38 何亮1 阅读(15) 评论(0) 推荐(0) 编辑
摘要: index = (value * value) >> 28 (右移,除以2^28。记法:左移变大,是乘。右移变小,是除。) 阅读全文
posted @ 2021-07-23 14:14 何亮1 阅读(59) 评论(0) 推荐(0) 编辑
摘要: FROM_UNIXTIME(timestamp|12332132, '%Y-%m-%d')->str; UNIX_TIMESTAMP('2020-01-01 11:11:11')->timestamp|int; STR_TO_DATE(2020-01-01','%Y-%m-%d'); DATE_FO 阅读全文
posted @ 2021-07-22 17:21 何亮1 阅读(52) 评论(0) 推荐(0) 编辑
摘要: group by 的内容设为子表tmp, 外面嵌套一层查询 连接 on duplicate key update key = tmp.new_key 阅读全文
posted @ 2021-07-21 11:41 何亮1 阅读(64) 评论(0) 推荐(0) 编辑
摘要: <?php define(DS, DIRECTORY_SEPARATOR); function gen_dir($path='.'){ $c_dir = opendir($path); while ($dir = readdir($c_dir)){ yield $dir; }; closedir($ 阅读全文
posted @ 2020-11-25 15:30 何亮1 阅读(77) 评论(0) 推荐(0) 编辑