提交 34ec7ab9 编写于 作者: 彭世瑜's avatar 彭世瑜

fix

上级 517683aa
此差异已折叠。
...@@ -60,7 +60,7 @@ ...@@ -60,7 +60,7 @@
[流程结构 if while](blog/php-mysql/sql-if-while.md) [流程结构 if while](blog/php-mysql/sql-if-while.md)
[函数 function](blog/php-mysql/sql-function.md) [内置函数和自定义函数 function](blog/php-mysql/sql-function.md)
[存储过程 procedure](blog/php-mysql/sql-procedure.md) [存储过程 procedure](blog/php-mysql/sql-procedure.md)
......
# 函数 function # 内置函数和自定义函数 function
函数分为两类:系统函数和自定义函数 函数分为两类:系统函数和自定义函数
...@@ -19,9 +19,12 @@ length | 判断字符串的字节数,与字符集有关 ...@@ -19,9 +19,12 @@ length | 判断字符串的字节数,与字符集有关
concat | 连接字符串 concat | 连接字符串
insrt | 检查字符是否在目标字符串中,存在返回其位置,不存在返回 0 insrt | 检查字符是否在目标字符串中,存在返回其位置,不存在返回 0
lcase | 全部小写 lcase | 全部小写
left | 左侧开始截取字符串,直到指定位置
ltrim | 消除左边的空格 ltrim | 消除左边的空格
left(str, length) | 左侧开始截取字符串,直到指定位置
right(str, length) | 右侧开始截取字符串,直到指定位置
mid | 从中间指定位置开始截取,如果不指定截取长度,直接到最后 mid | 从中间指定位置开始截取,如果不指定截取长度,直接到最后
`substring(str, index, [length]`) | 从指定位置开始,指定截取长度
substring_index(str, delim, count) | 按照关键字截取
示例 示例
...@@ -39,9 +42,15 @@ select instr('你好中国', '我'); // 0 ...@@ -39,9 +42,15 @@ select instr('你好中国', '我'); // 0
select lcase('aBcd'); // abcd select lcase('aBcd'); // abcd
select left('aBcd', 2); // aB select left('aBcd', 2); // aB
select right('abcdef', 2); // ef
select substring('abcdef', 2, 3); // bcd
select substring('abcdef', -2, 3); // ef
select ltrim(' abc d '); // abc d select ltrim(' abc d '); // abc d
select mid('你好中国', 3); // 中国 select mid('你好中国', 3); // 中国
select substring_index('www.baidu.com', '.', 2); // www.baidu
select substring_index('www.baidu.com', '.', -2); // baidu.com
``` ```
### 1.2、时间函数 ### 1.2、时间函数
......
...@@ -18,6 +18,15 @@ ...@@ -18,6 +18,15 @@
href="static/js/vue@4.12.2.min.css"> href="static/js/vue@4.12.2.min.css">
<style> <style>
:root {
--toc-width: 300px;
}
/* 左侧导航 */
.sidebar {
width: 220px;
}
/* 更新时间 */ /* 更新时间 */
.last-update-time-wrap { .last-update-time-wrap {
padding: 20px 0; padding: 20px 0;
...@@ -33,7 +42,29 @@ ...@@ -33,7 +42,29 @@
/* 右侧目录 */ /* 右侧目录 */
.page_toc { .page_toc {
margin-top: 20px; margin-top: 20px;
max-height: calc(100vh - 100px);
overflow-y: auto;
/* height: 100px; */
}
.page_toc::-webkit-scrollbar {
width: 4px
}
.page_toc::-webkit-scrollbar-thumb {
background: 0 0;
border-radius: 4px
}
.page_toc:hover::-webkit-scrollbar-thumb {
background: hsla(0, 0%, 53.3%, .4)
} }
.page_toc:hover::-webkit-scrollbar-track {
background: hsla(0, 0%, 53.3%, .1)
}
</style> </style>
</head> </head>
...@@ -85,12 +116,16 @@ ...@@ -85,12 +116,16 @@
<script src="static/js/prism-bash.min.js"></script> <script src="static/js/prism-bash.min.js"></script>
<script src="static/js/prism-php.min.js"></script> <script src="static/js/prism-php.min.js"></script>
<script src="static/js/prism-sql.min.js"></script> <script src="static/js/prism-sql.min.js"></script>
<script src="static/js/prism-python.min.js"></script>
<script src="static/js/prism-json@1.26.0.min.js"></script> <script src="static/js/prism-json@1.26.0.min.js"></script>
<script src="static/js/search@4.12.2.min.js"></script> <script src="static/js/search@4.12.2.min.js"></script>
<script src="static/js/docsify-copy-code@2.1.1.min.js"></script> <script src="static/js/docsify-copy-code@2.1.1.min.js"></script>
<script src="static/js/time-updater@1.min.js"></script> <script src="static/js/time-updater@1.min.js"></script>
<!-- 下载地址 -->
<!-- https://cdn.jsdelivr.net/npm/prismjs@1/components/prism-python.min.js-->
<link rel="stylesheet" <link rel="stylesheet"
href="static/js/toc.css"> href="static/js/toc.css">
<script src="static/js/toc.js"></script> <script src="static/js/toc.js"></script>
......
Prism.languages.python={comment:{pattern:/(^|[^\\])#.*/,lookbehind:!0,greedy:!0},"string-interpolation":{pattern:/(?:f|fr|rf)(?:("""|''')[\s\S]*?\1|("|')(?:\\.|(?!\2)[^\\\r\n])*\2)/i,greedy:!0,inside:{interpolation:{pattern:/((?:^|[^{])(?:\{\{)*)\{(?!\{)(?:[^{}]|\{(?!\{)(?:[^{}]|\{(?!\{)(?:[^{}])+\})+\})+\}/,lookbehind:!0,inside:{"format-spec":{pattern:/(:)[^:(){}]+(?=\}$)/,lookbehind:!0},"conversion-option":{pattern:/![sra](?=[:}]$)/,alias:"punctuation"},rest:null}},string:/[\s\S]+/}},"triple-quoted-string":{pattern:/(?:[rub]|br|rb)?("""|''')[\s\S]*?\1/i,greedy:!0,alias:"string"},string:{pattern:/(?:[rub]|br|rb)?("|')(?:\\.|(?!\1)[^\\\r\n])*\1/i,greedy:!0},function:{pattern:/((?:^|\s)def[ \t]+)[a-zA-Z_]\w*(?=\s*\()/g,lookbehind:!0},"class-name":{pattern:/(\bclass\s+)\w+/i,lookbehind:!0},decorator:{pattern:/(^[\t ]*)@\w+(?:\.\w+)*/m,lookbehind:!0,alias:["annotation","punctuation"],inside:{punctuation:/\./}},keyword:/\b(?:_(?=\s*:)|and|as|assert|async|await|break|case|class|continue|def|del|elif|else|except|exec|finally|for|from|global|if|import|in|is|lambda|match|nonlocal|not|or|pass|print|raise|return|try|while|with|yield)\b/,builtin:/\b(?:__import__|abs|all|any|apply|ascii|basestring|bin|bool|buffer|bytearray|bytes|callable|chr|classmethod|cmp|coerce|compile|complex|delattr|dict|dir|divmod|enumerate|eval|execfile|file|filter|float|format|frozenset|getattr|globals|hasattr|hash|help|hex|id|input|int|intern|isinstance|issubclass|iter|len|list|locals|long|map|max|memoryview|min|next|object|oct|open|ord|pow|property|range|raw_input|reduce|reload|repr|reversed|round|set|setattr|slice|sorted|staticmethod|str|sum|super|tuple|type|unichr|unicode|vars|xrange|zip)\b/,boolean:/\b(?:False|None|True)\b/,number:/\b0(?:b(?:_?[01])+|o(?:_?[0-7])+|x(?:_?[a-f0-9])+)\b|(?:\b\d+(?:_\d+)*(?:\.(?:\d+(?:_\d+)*)?)?|\B\.\d+(?:_\d+)*)(?:e[+-]?\d+(?:_\d+)*)?j?(?!\w)/i,operator:/[-+%=]=?|!=|:=|\*\*?=?|\/\/?=?|<[<=>]?|>[=>]?|[&|^~]/,punctuation:/[{}[\];(),.:]/},Prism.languages.python["string-interpolation"].inside.interpolation.inside.rest=Prism.languages.python,Prism.languages.py=Prism.languages.python;
\ No newline at end of file
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册