From: konrad Date: Wed, 6 Oct 2010 19:32:02 +0000 (+0000) Subject: fix some DB problems X-Git-Url: http://git.silmor.de/gitweb/?a=commitdiff_plain;h=b70e24d4efaff6edfa8145fa0d103aa5e0a1457a;p=web%2Fkonrad%2Fpack.git fix some DB problems git-svn-id: https://silmor.de/svn/softmagic/pack/trunk@601 6e3c4bff-ac9f-4ac1-96c5-d2ea494d3e33 --- diff --git a/phpbase/db.php b/phpbase/db.php index f86bda6..3709102 100644 --- a/phpbase/db.php +++ b/phpbase/db.php @@ -292,6 +292,7 @@ abstract class DbEngine /**escapes a list of integers; uses escapeInt for each element; automatically adds parentheses*/ public function escapeIntList(array $il) { + if(count($il)==0)return "(NULL)"; $r="("; $b=false; foreach($il as $i){ diff --git a/phpbase/db_pgsql.php b/phpbase/db_pgsql.php index 8786654..78849d6 100644 --- a/phpbase/db_pgsql.php +++ b/phpbase/db_pgsql.php @@ -135,8 +135,9 @@ class PGsqlEngine extends DbEngine //if we are in write mode and there is no grouping //(no grouping is a PGSql limitation) //then append "FOR UPDATE" to tell the DB we will be writing - if($this->transmode && $orderby!="") - $query.=" FOR UPDATE"; + //currently turned off, there are too many don'ts +// if($this->transmode && $orderby=="") +// $query.=" FOR UPDATE"; $res=@pg_query($this->dbhdl,$query); if($res===false){ $this->db_debug_error("select",$query);