From b70e24d4efaff6edfa8145fa0d103aa5e0a1457a Mon Sep 17 00:00:00 2001 From: konrad Date: Wed, 6 Oct 2010 19:32:02 +0000 Subject: [PATCH] fix some DB problems git-svn-id: https://silmor.de/svn/softmagic/pack/trunk@601 6e3c4bff-ac9f-4ac1-96c5-d2ea494d3e33 --- phpbase/db.php | 1 + phpbase/db_pgsql.php | 5 +++-- 2 files changed, 4 insertions(+), 2 deletions(-) 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); -- 1.7.2.5