From c6aa2209d1c43d30c8c9789ae7b7aaaec9814b56 Mon Sep 17 00:00:00 2001 From: wlx Date: Sat, 17 Nov 2012 08:54:43 +0000 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E4=B8=8D=E8=83=BD=E5=AF=BC?= =?UTF-8?q?=E5=85=A5=E6=96=87=E4=BB=B6=E5=88=97=E8=A1=A8=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- tools/proftp_upload.php | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) 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.'写入失败';