[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Fmsystem-commits] [6695] property: fix filter/search
From: |
Sigurd Nes |
Subject: |
[Fmsystem-commits] [6695] property: fix filter/search |
Date: |
Wed, 22 Dec 2010 11:23:08 +0000 |
Revision: 6695
http://svn.sv.gnu.org/viewvc/?view=rev&root=fmsystem&revision=6695
Author: sigurdne
Date: 2010-12-22 11:23:08 +0000 (Wed, 22 Dec 2010)
Log Message:
-----------
property: fix filter/search
Modified Paths:
--------------
trunk/property/inc/class.sogeneric.inc.php
Modified: trunk/property/inc/class.sogeneric.inc.php
===================================================================
--- trunk/property/inc/class.sogeneric.inc.php 2010-12-22 10:04:57 UTC (rev
6694)
+++ trunk/property/inc/class.sogeneric.inc.php 2010-12-22 11:23:08 UTC (rev
6695)
@@ -197,8 +197,17 @@
{
$id_query = "'{$query}'";
}
+
+ $_query_start = '';
+ $_query_end = '';
+
+ if($filtermethod)
+ {
+ $_query_start = '(';
+ $_query_end = ')';
+ }
$query = $this->_db->db_addslashes($query);
- $querymethod = " {$where }
({$table}.{$this->location_info['id']['name']} = {$id_query}";
+ $querymethod = " {$where } {$_query_start}
({$table}.{$this->location_info['id']['name']} = {$id_query}";
//_debug_array($filtermethod);
//_debug_array($where);die();
@@ -241,9 +250,10 @@
$querymethod .= " $where (" . implode
(' OR ',$_querymethod) . ')';
}
+ $querymethod .= $_query_end;
}
- $sql = "SELECT * FROM $table $filtermethod
$querymethod";
+ $sql = "SELECT * FROM $table {$filtermethod}
{$querymethod}";
$this->_db->query('SELECT count(*) as cnt ' .
substr($sql,strripos($sql,'from')),__LINE__,__FILE__);
$this->_db->next_record();
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Fmsystem-commits] [6695] property: fix filter/search,
Sigurd Nes <=