SyncRule: one more attempt to avoid ZF magic

This commit is contained in:
Thomas Gelf 2015-12-02 15:27:25 +01:00
parent e45cb51031
commit d37991627a
1 changed files with 3 additions and 3 deletions

View File

@ -49,9 +49,9 @@ class SyncRule extends DbObject
return $db->fetchOne(
$db->select()
->from(
'sync_property',
array('priority' => '(CASE WHEN MAX(priority) IS NULL THEN 1 ELSE MAX(priority) + 1 END)')
)->where('rule_id = ?', $this->id)
array('p' => 'sync_property'),
array('priority' => '(CASE WHEN MAX(p.priority) IS NULL THEN 1 ELSE MAX(p.priority) + 1 END)')
)->where('p.rule_id = ?', $this->id)
);
}