摘要:
SELECT CAST(id AS char) AS id FROM `table_name` 我也不知道为啥会导致自动四舍五入,有知道的吗? 阅读全文
摘要:
function getDateRange($dateStart,$dateEnd,bool $timestamp=false): array { $dateStartTimeStamp = strtotime($dateStart); $dateEndTimeStamp = strtotime($ 阅读全文
摘要:
在Base控制器里写: View::assign('aaa','123'); 阅读全文
摘要:
db_host = "localhost" db_user = "root" db_pass = "root" db_name = "test" db_port = 3306 db_charset = "utf8" # -*- coding: utf-8 -*- """Python连接到 MySQL 阅读全文
摘要:
/** * @param $arr array 数组 * @param $key string 唯一键 * @return array */ function getArrayUniqueByKeys(array $arr, string $key):array { if (isset($arr[0 阅读全文
摘要:
hexdec(uniqid()) hexdec(uniqid()) 阅读全文
摘要:
查询用户ID为1的所有子用户: select id, name, parent from (select * from tablename order by parent, id) tablename, (select @pv := '1') initialisation where find_in 阅读全文
摘要:
/** * 格式化打印:JSON字符串|对象|数组 * @param string|array $data */ public static function Console($data) { if (is_string($data) && 0 < strlen($data) && self::is 阅读全文
摘要:
location / { if (!-e $request_filename){ rewrite ^(.*)$ /index.php?s=$1 last; break; } } 阅读全文
摘要:
<?php function getMonthStartAndEnd($timestamp){ $startTime = strtotime(date("Y-m-01 00:00:00",$timestamp)); $startTimeStr = date("Y-m-d H:i:s",$startT 阅读全文