北京东泽互动信息技术有限公司

phpcms v9 推送【删除】和【附加字段】

文章出处:未知 │ 网站编辑:960web │ 发表时间:2017-08-02 23:17 我要分享

phpcms v9在删除推送的数据时会报错:

MySQL Error : BIGINT UNSIGNED value is out of range in '(`web`.`42_category`.`items` - 1)'
mysql Errno : 1690
Message : BIGINT UNSIGNED value is out of range in '(`web`.`42_category`.`items` - 1)'

解决:

phpcms\model\content_model.class.PHP

 

	private function update_category_items($catid,$action = 'add',$cache = 0) {
		$this->category_db = pc_base::load_model('category_model');
		if($action=='add') {
			$this->category_db->update(array('items'=>'+=1'),array('catid'=>$catid));
		}  else {
			//$this->category_db->update(array('items'=>'-=1'),array('catid'=>$catid));//注释掉这句
		}
		if($cache) $this->cache_items();
	}

 

phpcms v9推送时增加content内容

phpcms\modules\content\classes\push_api.class.php

 

//$this->db->insert(array('id'=>$newid));//注释官方的
//推送内容下面2行代码
$info = $this->db->get_content($catid,$id);
$this->db->insert(array('id'=>$newid,'content'=>$info['content']));

pc标签调用content字段别忘记加入 moreinfo="1" 哦。

更多