[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Fmsystem-commits] [7207] property: fix sql
From: |
Sigurd Nes |
Subject: |
[Fmsystem-commits] [7207] property: fix sql |
Date: |
Mon, 11 Apr 2011 12:54:38 +0000 |
Revision: 7207
http://svn.sv.gnu.org/viewvc/?view=rev&root=fmsystem&revision=7207
Author: sigurdne
Date: 2011-04-11 12:54:38 +0000 (Mon, 11 Apr 2011)
Log Message:
-----------
property: fix sql
Modified Paths:
--------------
trunk/property/inc/class.soevent.inc.php
Modified: trunk/property/inc/class.soevent.inc.php
===================================================================
--- trunk/property/inc/class.soevent.inc.php 2011-04-11 06:32:22 UTC (rev
7206)
+++ trunk/property/inc/class.soevent.inc.php 2011-04-11 12:54:38 UTC (rev
7207)
@@ -81,22 +81,19 @@
$ordermethod = ' ORDER BY schedule_time ASC';
}
- $where= 'WHERE';
- $filtermethod = '';
+ $filtermethod = " WHERE location_id = {$location_id}";
+
if($user_id)
{
$user =
$GLOBALS['phpgw']->accounts->get($user_id);
- $filtermethod = " WHERE fm_event.responsible_id
=" . (int)$user->person_id ;
- $where= 'AND';
+ $filtermethod .= " AND fm_event.responsible_id
=" . (int)$user->person_id ;
}
- $filtermethod .= "$where location_id = {$location_id}";
-
if($query)
{
$query = $this->_db->db_addslashes($query);
- $querymethod = " $where fm_event.descr
{$this->_like} '%{$query}%'";
+ $querymethod = " AND fm_event.descr
{$this->_like} '%{$query}%'";
}
$sql = "SELECT fm_event.id, fm_event.descr,
schedule_time, exception_time, location_id, location_item_id,"
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Fmsystem-commits] [7207] property: fix sql,
Sigurd Nes <=