[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Phpgroupware-cvs] phpgwapi/inc class.db.inc.php
From: |
Sigurd Nes |
Subject: |
[Phpgroupware-cvs] phpgwapi/inc class.db.inc.php |
Date: |
Sat, 15 Apr 2006 12:12:59 +0000 |
CVSROOT: /sources/phpgwapi
Module name: phpgwapi
Branch:
Changes by: Sigurd Nes <address@hidden> 06/04/15 12:12:59
Modified files:
inc : class.db.inc.php
Log message:
add join and like statements as dbms - dependant
CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/phpgwapi/phpgwapi/inc/class.db.inc.php.diff?tr1=1.22&tr2=1.23&r1=text&r2=text
Patches:
Index: phpgwapi/inc/class.db.inc.php
diff -u phpgwapi/inc/class.db.inc.php:1.22 phpgwapi/inc/class.db.inc.php:1.23
--- phpgwapi/inc/class.db.inc.php:1.22 Sun Mar 19 19:17:11 2006
+++ phpgwapi/inc/class.db.inc.php Sat Apr 15 12:12:59 2006
@@ -9,7 +9,7 @@
* @link http://www.sanisoft.com/phplib/manual/DB_sql.php
* @package phpgwapi
* @subpackage database
- * @version $Id: class.db.inc.php,v 1.22 2006/03/19 19:17:11 sigurdne
Exp $
+ * @version $Id: class.db.inc.php,v 1.23 2006/04/15 12:12:59 sigurdne
Exp $
*/
if (empty($GLOBALS['phpgw_info']['server']['db_type']))
@@ -75,6 +75,16 @@
* @var bool $auto_stripslashes automagically remove slashes
from field values returned?
*/
var $auto_stripslashes = false;
+
+ /**
+ * @var string JOIN-statement dependent on dbms
+ */
+ var $join;
+
+ /**
+ * @var string case insensitive LIKE-statement dependent on dbms
+ */
+ var $like;
/**
* Constructor
@@ -90,6 +100,17 @@
$this->query($query);
}
//$this->debug = $debug; // commented to stop undefined
var error
+
+ if
($GLOBALS['phpgw_info']['server']['db_type']=='pgsql')
+ {
+ $this->join = "JOIN";
+ $this->like = "ILIKE";
+ }
+ else
+ {
+ $this->join = "INNER JOIN";
+ $this->like = "LIKE";
+ }
}
/**
- [Phpgroupware-cvs] phpgwapi/inc class.db.inc.php,
Sigurd Nes <=