diff --git a/core/class/io/io_dzz.php b/core/class/io/io_dzz.php index d272b67..a15ef24 100644 --- a/core/class/io/io_dzz.php +++ b/core/class/io/io_dzz.php @@ -342,7 +342,7 @@ public function uploadToattachment($attach, $appid, $fid = '', $level = 0) global $_G; //如果当前库有该文件 - if ($rid = DB::result_first("select rid from %t where path = %d and appid = %s ", array('pichome_resources_attr', $attach['aid'], $appid))) { + if ($rid = DB::result_first("select rid from %t where path = %s and appid = %s ", array('pichome_resources_attr', $attach['aid'], $appid))) { $resourcesdata = C::t('pichome_resources')->fetch($rid); if($resourcesdata['isdelete']){ @@ -441,7 +441,7 @@ public function uploadToattachment($attach, $appid, $fid = '', $level = 0) } } - elseif ($rid = DB::result_first("select rid from %t where path = %d ", array('pichome_resources_attr',$attach['aid']))) {//如果当前库没有该文件,但其它库有 + elseif ($rid = DB::result_first("select rid from %t where path = %s ", array('pichome_resources_attr',$attach['aid']))) {//如果当前库没有该文件,但其它库有 //获取原文件基本数据 $resourcesdata = C::t('pichome_resources')->fetch($rid); $rsetarr = [ diff --git a/dzz/pichome/library/upload.php b/dzz/pichome/library/upload.php index fde50ed..79ca0fc 100644 --- a/dzz/pichome/library/upload.php +++ b/dzz/pichome/library/upload.php @@ -81,7 +81,7 @@ $folderdata = C::t('pichome_folder')->createfolerbypath($appid, $relativepath, $pfid); //如果当前库有该文件 - if ($rid = DB::result_first("select rid from %t where path = %d and appid = %s ", array('pichome_resources_attr', $aid, $appid))) { + if ($rid = DB::result_first("select rid from %t where path = %s and appid = %s ", array('pichome_resources_attr', $aid, $appid))) { $resourcesdata = C::t('pichome_resources')->fetch($rid); if($resourcesdata['isdelete']){ $rsetarr = [ @@ -187,7 +187,7 @@ } } - elseif ($rid = DB::result_first("select rid from %t where path = %d ", array('pichome_resources_attr', $aid))) {//如果当前库没有该文件,但其它库有 + elseif ($rid = DB::result_first("select rid from %t where path = %s ", array('pichome_resources_attr', $aid))) {//如果当前库没有该文件,但其它库有 //获取原文件基本数据 $resourcesdata = C::t('pichome_resources')->fetch($rid); $rsetarr = [