Loading

工作笔记

Mysql去除字段内容中指定字符

update 表名 set 字段=replace(字段,'要删除的串','') where 条件
updateset ZD=replace(ZD,'123','') where ZD like '%123%'

 strpos() 函数查找字符串在另一字符串中第一次出现的位置,没有则返回false

// 查找 "php" 在字符串中第一次出现的位置:
echo strpos("666 php!","php");

thinkphp5 ---- object(think\response\Json)转数组

当我们调用json返回的对象想要转成数组方便循环时

 我们使用getContent()方法就可以转数组了

$flag = $this->orderList();
$flag = json_decode($flag->getContent(),true); 

posted @ 2022-06-01 07:58  5572  阅读(17)  评论(0编辑  收藏  举报