fixed SQL queries

This commit is contained in:
Ralf Becker 2005-07-20 12:42:09 +00:00
parent 5e97b462c4
commit d933e70c72

View File

@ -77,20 +77,20 @@
switch($_action) switch($_action)
{ {
case 'modify': case 'modify':
$query .= "sync_modified > '".$this->db->to_timestamp($_ts)."' and sync_modified > sync_deleted"; $query .= "sync_modified > '".$this->db->to_timestamp($_ts)."' and sync_deleted is null";
break; break;
case 'delete': case 'delete':
$query .= "sync_deleted > '".$this->db->to_timestamp($_ts)."'"; $query .= "sync_deleted > '".$this->db->to_timestamp($_ts)."'";
break; break;
case 'add': case 'add':
$query .= "sync_added > '".$this->db->to_timestamp($_ts)."' and sync_added > sync_deleted and sync_added > sync_modified"; $query .= "sync_added > '".$this->db->to_timestamp($_ts)."' and sync_deleted is null and sync_modified is null ";
break; break;
default: default:
// no valid $_action set // no valid $_action set
return array(); return array();
break; break;
} }
//Horde::logMessage("SymcML: egwcontactssync $query", __FILE__, __LINE__, PEAR_LOG_DEBUG);
$this->db->query($query, __LINE__, __FILE__); $this->db->query($query, __LINE__, __FILE__);
$guidList = array(); $guidList = array();