phpgroupware-cvs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Phpgroupware-cvs] property/inc/class.sodocument.inc.php, 1.3.2.6


From: nomail
Subject: [Phpgroupware-cvs] property/inc/class.sodocument.inc.php, 1.3.2.6
Date: Tue, 7 Dec 2004 10:04:28 +0100

Update of /property/inc
Modified Files:
        Branch: proposed-0_9_18-branch
          class.sodocument.inc.php

date: 2004/12/07 09:04:28;  author: sigurdne;  state: Exp;  lines: +5 -4

Log Message:
Using ilike if pgsql
=====================================================================
Index: property/inc/class.sodocument.inc.php
diff -u property/inc/class.sodocument.inc.php:1.3.2.5 
property/inc/class.sodocument.inc.php:1.3.2.6
--- property/inc/class.sodocument.inc.php:1.3.2.5       Thu Nov 18 22:12:08 2004
+++ property/inc/class.sodocument.inc.php       Tue Dec  7 09:04:28 2004
@@ -43,6 +43,7 @@
                        $this->socommon         = 
CreateObject($this->currentapp.'.socommon');
 
                        $this->join                     = $this->socommon->join;
+                       $this->like                     = $this->socommon->like;
                }
 
                function select_doc_type_list()
@@ -226,7 +227,7 @@
                                $query = ereg_replace("'",'',$query);
                                $query = ereg_replace('"','',$query);
 
-                               $querymethod = " $where (fm_document.address 
LIKE '%$query%' or fm_document.location_code LIKE '%$query%')";
+                               $querymethod = " $where (fm_document.address 
$this->like '%$query%' or fm_document.location_code $this->like '%$query%')";
                        }
 
 
@@ -293,7 +294,7 @@
                                $ordermethod = ' order by location_code ASC';
                        }
 
-                       $filtermethod = " fm_document.location_code LIKE 
'%$location_code%'";
+                       $filtermethod = " fm_document.location_code $this->like 
'%$location_code%'";
 
                        if ($doc_type > 0)
                        {
@@ -315,7 +316,7 @@
                                $query = ereg_replace("'",'',$query);
                                $query = ereg_replace('"','',$query);
 
-                               $querymethod = " AND fm_document.title LIKE 
'%$query%' or fm_document.document_name LIKE '%$query%'";
+                               $querymethod = " AND fm_document.title 
$this->like '%$query%' or fm_document.document_name $this->like '%$query%'";
                        }
 
                        $sql = "SELECT fm_document.*, 
fm_document_category.descr as category FROM fm_document $this->join 
fm_document_category on fm_document.category = fm_document_category.id WHERE  
$filtermethod $querymethod ";




reply via email to

[Prev in Thread] Current Thread [Next in Thread]