开发框架 版主:迅睿框架研发组
提示 You must use the "set" method to update an entry
类型:迅睿CMS 更新时间:2020-11-11 23:54:03

模块表单采集入库问题,更新副表是,一直提示必须用 set?


{xunruicms_img_title}


$rt = \Phpcmf\Service::M()->table_site("form_表单名")->insert($data);
$data['tableid'] = floor($rt['code']/50000);

$tableid = floor($rt['code']/50000);

\Phpcmf\Service::M()->table_site("form_表单名")->update($rt['code'], ['tableid' => $tableid]);


就算换下面的写法也是这么提示 You must use the "set" method to update an entry.


$db = \Phpcmf\Service::M()->db->table(SITE_ID."_news_form_表单名");
$db->where('id', $rt['code']);
$db->set('tableid', $tableid);
$db->update();


回帖
  • 小黄人 18html
    #1楼    小黄人 18html
    2020-11-11 23:53:54
    Chrome 0
    ....
    满意答案
  • 小黄人 18html
    #2楼    小黄人 18html
    2020-11-11 23:54:03
    Chrome 0
    @小黄人 18html:完结完结完结