首页 > 编程语言 >thinkphp find_in_set 与 replace

thinkphp find_in_set 与 replace

时间:2023-03-15 10:55:39浏览次数:34  
标签:10 set cid replace 12 thinkphp find

//find_in_set        
 $model->where('find_in_set(:cid,rc)', ['cid' => 9])->select();


//replace替换  搜索(10,12), 原(10),新(9)

$model->where('id',1)->update([ 
  'rc' => Db::raw("replace('10,12',10,9)") 
]);

  

标签:10,set,cid,replace,12,thinkphp,find
From: https://www.cnblogs.com/jwyq/p/17217709.html

相关文章

  • Set
    Set特点:无序,无下标,元素不可重复。方法:全部继承Collection中的方法packagecom.zhang.oop.Coll;importjava.util.HashSet;importjava.util.Iterator;importjava.ut......
  • could not find version 9.6 of matlab runtime解决方法
    背景描述:用Qt执行matlab做的.exe程序文件,报如下图错误,couldnotfindversion9.6ofthematlabRuntime.电脑上原装的是matlab2017a对应的版本是9.2解决方案:去该链接下......
  • Cadence Virtuoso中动态链接到ADS不正常,Cannot find registration file ads,cdsenv to
      当启动virtuoso时会有如下警告,从而导致virtuoso动态链接到ADS工作不正常,比如仿真没有结果。解决方法:执行配置脚本,脚本位于$HPEESOF_DIR/bin/idfConfigCadence,直接执......
  • C# 关于 SET IDENTITY_INSERT TableN ON 失效
    设置自增标识列的脚本不能单独执行,是没有效果的,需要在同一域执行,才会生效SETIDENTITY_INSERTBiz_Sell_ProduceshippingONINSERTINTOBiz_Sell_ProduceshippingVAL......
  • Find the smallest integer in the array
    InstructionsGivenanarrayofintegersyoursolutionshouldfindthesmallestinteger.Forexample:Given[34,15,88,2]yoursolutionwillreturn2Given......
  • Katalon-指定浏览器窗口大小(Set View Port Size)
      点击setviewportsize ......
  • React有Fiber架构 为什么还需要 useTransition( ) 钩子优化 ?
    因为fiber的最小单元是React元素,对于一个非常耗时的函数,fiber是无法把一个函数拆分成几部分去执行的,仍然会有顶帧(卡顿)的现象发生,此时就需要使用useTransition(()=>目标Func......
  • Linux下的find的使用方法
    (Linux下的find的使用方法)一、通过文件修改时间查询1.查找5分钟前的文件查找5分钟之前的文件,可使用以下命令:[root@tianyi~]#find/etc-mmin+5|head|nl1 ......
  • git reset --soft 和 --hard
    --soft下图是第五次commit的内容:现在,gitreset--soft<hash>回退版本:--soft保留了第五次commit的内容(所有的更改都在暂存区),当前已经退到了第四次commit。在我......
  • visual studio code setting
    {"terminal.integrated.env.windows":{},"terminal.integrated.shell.windows":"D:\\xxn\\Git\\bin\\bash.exe","terminal.integrated.profiles.windows":{......