phpgroupware-cvs
[Top][All Lists]
Advanced

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

[Phpgroupware-cvs] property/inc/class.sotemplate.inc.php, 1.2.2.4


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

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

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

Log Message:
Using ilike if pgsql
=====================================================================
Index: property/inc/class.sotemplate.inc.php
diff -u property/inc/class.sotemplate.inc.php:1.2.2.3 
property/inc/class.sotemplate.inc.php:1.2.2.4
--- property/inc/class.sotemplate.inc.php:1.2.2.3       Thu Nov 18 22:12:08 2004
+++ property/inc/class.sotemplate.inc.php       Tue Dec  7 09:04:28 2004
@@ -38,6 +38,7 @@
 
                        $this->join                     = $this->socommon->join;
                        $this->left_join        = $this->socommon->left_join;
+                       $this->like                     = $this->socommon->like;
                }
 
                function read($data)
@@ -91,7 +92,7 @@
                                $query = ereg_replace("'",'',$query);
                                $query = ereg_replace('"','',$query);
 
-                               $querymethod = " $where (fm_template.descr LIKE 
'%$query%')";
+                               $querymethod = " $where (fm_template.descr 
$this->like '%$query%')";
                        }
 
                        $sql = "SELECT 
fm_template.id,fm_template.descr,fm_template.name,fm_template.owner,fm_template.entry_date,"
@@ -163,7 +164,7 @@
                                $query = ereg_replace("'",'',$query);
                                $query = ereg_replace('"','',$query);
 
-                               $querymethod = " AND (hours_descr LIKE 
'%$query%' or fm_template_hours.remark LIKE '%$query%' or ns3420_id LIKE 
'%$query%')";
+                               $querymethod = " AND (hours_descr $this->like 
'%$query%' or fm_template_hours.remark $this->like '%$query%' or ns3420_id 
$this->like '%$query%')";
                        }
 
                        $sql = "SELECT fm_template_hours.*, chapter_id from 
fm_template_hours  $this->join fm_template on 
fm_template.id=fm_template_hours.template_id $filtermethod $querymethod";




reply via email to

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