diff --git a/core/class/table/table_organization.php b/core/class/table/table_organization.php index 8ea6f9a..0c72ed1 100644 --- a/core/class/table/table_organization.php +++ b/core/class/table/table_organization.php @@ -470,7 +470,7 @@ class table_organization extends dzz_table self::setPathkeyByOrgid($setarr['orgid']); if($setarr['type']=='0'){ //更新disp - foreach(DB::fetch_all("select orgid,disp form %t where forgid=%d and type='0' and disp>=%d and orgid!=%d",array($this->_table,$setarr['forgid'],intval($setarr['disp']),$setarr['orgid'] )) as $value){ + foreach(DB::fetch_all("select orgid,disp from %t where forgid=%d and type='0' and disp>=%d and orgid!=%d",array($this->_table,$setarr['forgid'],intval($setarr['disp']),$setarr['orgid'] )) as $value){ parent::update($value['orgid'],array('disp'=>$value['disp']+1)); } } diff --git a/core/class/table/table_resources_version.php b/core/class/table/table_resources_version.php index 49de60c..36e163b 100644 --- a/core/class/table/table_resources_version.php +++ b/core/class/table/table_resources_version.php @@ -82,7 +82,7 @@ class table_resources_version extends dzz_table if(empty($rid)) $rid=$vinfo['rid']; $datainfo = C::t('resources')->fetch_info_by_rid($rid); if($datainfo['vid']==$vinfo['vid']){//如果删除的是主版本,判断是否是最后一个版本,最后一个版本不让删除 - if(!$nvid=DB::result_first("select vid form %t where rid=%s and vid!=%d order by vid DESC",array($this->_table,$rid,$vid))){ + if(!$nvid=DB::result_first("select vid from %t where rid=%s and vid!=%d order by vid DESC",array($this->_table,$rid,$vid))){ return false; } }