phpgroupware-cvs
[Top][All Lists]
Advanced

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

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


From: nomail
Subject: [Phpgroupware-cvs] property/inc/class.sostandard_entity.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.sostandard_entity.inc.php

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

Log Message:
Using ilike if pgsql
=====================================================================
Index: property/inc/class.sostandard_entity.inc.php
diff -u property/inc/class.sostandard_entity.inc.php:1.2.2.3 
property/inc/class.sostandard_entity.inc.php:1.2.2.4
--- property/inc/class.sostandard_entity.inc.php:1.2.2.3        Thu Nov 18 
22:12:08 2004
+++ property/inc/class.sostandard_entity.inc.php        Tue Dec  7 09:04:28 2004
@@ -37,8 +37,7 @@
                        $this->bocommon         = 
CreateObject($this->currentapp.'.bocommon');
 
                        $this->join                     = $this->bocommon->join;
-
-
+                       $this->like                     = $this->bocommon->like;
                }
 
                function read($data)
@@ -76,7 +75,7 @@
                                $query = ereg_replace("'",'',$query);
                                $query = ereg_replace('"','',$query);
 
-                               $querymethod = " where name LIKE '%$query%' or 
descr LIKE '%$query%'";
+                               $querymethod = " where name $this->like 
'%$query%' or descr $this->like '%$query%'";
                        }
 
                        $sql = "SELECT * FROM $table $querymethod";
@@ -291,7 +290,7 @@
                                $query = ereg_replace("'",'',$query);
                                $query = ereg_replace('"','',$query);
 
-                               $querymethod = " and ($table.name LIKE 
'%$query%' or $table.descr LIKE '%$query%')";
+                               $querymethod = " and ($table.name $this->like 
'%$query%' or $table.descr $this->like '%$query%')";
                        }
 
                        $sql = "SELECT $table.id ,$table.name ,$table.descr, 
$table.datatype ,$type_table.name as type FROM $type_table $this->join $table 
on $table.type_id = $type_table.id where $table.type_id= '$type_id' 
$querymethod";




reply via email to

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