diff --git a/tools/proftp_upload.php b/tools/proftp_upload.php index 9fbdabcf..4b342949 100644 --- a/tools/proftp_upload.php +++ b/tools/proftp_upload.php @@ -35,7 +35,7 @@ //delete dataset & datafile records $sql="delete from dataset where uuid='$uuid'"; - pg_execute($link,$sql); + pg_query($link,$sql); $sql = "INSERT INTO dataset (uuid,path) VALUES ('$uuid','$homedir') RETURNING id"; $result=pg_query($link,$sql); @@ -55,9 +55,8 @@ $depth=substr_count($filename,"/")+1; if (substr($filename,-1,1)=='/') $depth--; //$this->chmodr($path.$v,0444); - $sql = "INSERT INTO datafile (dsid,filename,filesize,isdir,depth) VALUES (?,?,?,?,?)"; - $sth = $this->db->prepare($sql); - $rs = $sth->execute(array($dsid,$filename,$filesize,$isdir,$depth)); + $sql = "INSERT INTO datafile (dsid,filename,filesize,isdir,depth) VALUES ('$dsid','$filename','$filesize','$isdir','$depth')"; + $rs = pg_query($link,$sql); if(!$rs) { $messages[] = "数据文件".$filename.'写入失败';