Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
檀越@新空间
Coding Tree
提交
62e6eea8
C
Coding Tree
项目概览
檀越@新空间
/
Coding Tree
通知
2
Star
0
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
DevOps
流水线
流水线任务
计划
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
C
Coding Tree
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
DevOps
DevOps
流水线
流水线任务
计划
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
流水线任务
提交
Issue看板
“deabc8ca0b53566da5367e65370f0f7871dae45a”上不存在“doc/fluid/git@gitcode.net:s920243400/PaddleDetection.git”
提交
62e6eea8
编写于
6月 14, 2022
作者:
彭世瑜
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
fix
上级
f2eb15ce
变更
3
隐藏空白更改
内联
并排
Showing
3 changed file
with
39 addition
and
41 deletion
+39
-41
blog/php-mysql/index.md
blog/php-mysql/index.md
+2
-2
blog/php-mysql/sql-function.md
blog/php-mysql/sql-function.md
+36
-36
blog/php-mysql/sql-if-while.md
blog/php-mysql/sql-if-while.md
+1
-3
未找到文件。
blog/php-mysql/index.md
浏览文件 @
62e6eea8
...
...
@@ -58,9 +58,9 @@
28.
[
变量 variables
](
blog/php-mysql/sql-variables.md
)
[
流程结构 if while
](
blog/php-mysql/sql-if-while.md
)
29.
[
流程结构 if while
](
blog/php-mysql/sql-if-while.md
)
[
内置函数和自定义函数 function
](
blog/php-mysql/sql-function.md
)
30.
[
内置函数和自定义函数 function
](
blog/php-mysql/sql-function.md
)
[
存储过程 procedure
](
blog/php-mysql/sql-procedure.md
)
...
...
blog/php-mysql/sql-function.md
浏览文件 @
62e6eea8
...
...
@@ -12,19 +12,19 @@ select 函数名(参数列表);
### 1.1、字符串函数
函数名 | 说明
-
| -
char_length | 判断字符串的字符数
length | 判断字符串的字节数,与字符集有关
concat | 连接字符串
insrt | 检查字符是否在目标字符串中,存在返回其位置,不存在返回 0
lcase | 全部小写
ltrim | 消除左边的空格
left(str, length) | 左侧开始截取字符串,直到指定位置
right(str, length) | 右侧开始截取字符串,直到指定位置
mid | 从中间指定位置开始截取,如果不指定截取长度,直接到最后
`substring(str, index, [length])`
| 从指定位置开始,指定截取长度
substring_index(str, delim, count) | 按照关键字截取
|
函数名 | 说明
|
- | -
|
char_length | 判断字符串的字符数
|
length | 判断字符串的字节数,与字符集有关
|
concat | 连接字符串
|
insrt | 检查字符是否在目标字符串中,存在返回其位置,不存在返回 0
|
lcase | 全部小写
|
ltrim | 消除左边的空格
|
left(str, length) | 左侧开始截取字符串,直到指定位置
|
right(str, length) | 右侧开始截取字符串,直到指定位置
|
mid | 从中间指定位置开始截取,如果不指定截取长度,直接到最后
|
`substring(str, index, [length])`
| 从指定位置开始,指定截取长度
|
substring_index(str, delim, count) | 按照关键字截取
示例
...
...
@@ -55,15 +55,15 @@ select substring_index('www.baidu.com', '.', -2); // baidu.com
### 1.2、时间函数
函数名 | 说明
-
| -
now() | 返回当前时间,日期 时间
curdate() | 当前日期
curtime() | 当前时间
datediff() | 判断两个日期之间的天数之差,日期使用字符串格式(用引号)
date_add(日期, interval 时间数字 type) | 时间增加(type:
day hour minute second)
unix_timestamp() | 获取时间戳
from_unixtime() | 将指定时间戳转换成对应的日期时间格式
|
函数名 | 说明
|
- | -
|
now() | 返回当前时间,日期 时间
|
curdate() | 当前日期
|
curtime() | 当前时间
|
datediff() | 判断两个日期之间的天数之差,日期使用字符串格式(用引号)
| date_add(日期, interval 时间数字 type) | 时间增加(type: |
day hour minute second)
|
unix_timestamp() | 获取时间戳
|
from_unixtime() | 将指定时间戳转换成对应的日期时间格式
示例
...
...
@@ -83,14 +83,14 @@ select from_unixtime(1649599799); // 2022-04-10 22:09:59
### 1.3、数学函数
函数名 | 说明
-
| -
abs | 绝对值
ceiling | 向上取整
floor | 向下取整
pow | 指数
rand | 随机数(0-1)
round | 四舍五入
|
函数名 | 说明
|
- | -
|
abs | 绝对值
|
ceiling | 向上取整
|
floor | 向下取整
|
pow | 指数
|
rand | 随机数(0-1)
|
round | 四舍五入
示例
...
...
@@ -105,12 +105,12 @@ select round(1.5); // 2
### 1.4、其他函数
函数名 | 说明
-
| -
md5() | MD5
version() | 版本号
database() | 显示当前所在数据库
uuid() | 生成一个唯一标识符,全局唯一
|
函数名 | 说明
|
- | -
|
md5() | MD5
|
version() | 版本号
|
database() | 显示当前所在数据库
|
uuid() | 生成一个唯一标识符,全局唯一
示例
...
...
blog/php-mysql/sql-if-while.md
浏览文件 @
62e6eea8
# 流程结构
# 流程结构
if while
## if分支
...
...
@@ -110,5 +110,3 @@ mysql中没有continue 和break
end
while
[
标识名字
];
```
https://www.bilibili.com/video/BV1Vx411g7uJ?p=68&spm_id_from=pageDriver
\ No newline at end of file
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录