* [misc] replace COUNT(*) with COUNT(1) in sql.
This commit is contained in:
@@ -379,7 +379,7 @@ class taskModel extends model
|
||||
|
||||
if($isParentChanged)
|
||||
{
|
||||
$oldChildCount = $this->dao->select('count(*) as count')->from(TABLE_TASK)->where('parent')->eq($oldTask->parent)->fetch('count');
|
||||
$oldChildCount = $this->dao->select('COUNT(1) AS count')->from(TABLE_TASK)->where('parent')->eq($oldTask->parent)->fetch('count');
|
||||
if(!$oldChildCount) $this->dao->update(TABLE_TASK)->set('parent')->eq(0)->where('id')->eq($oldTask->parent)->exec();
|
||||
$this->dao->update(TABLE_TASK)->set('lastEditedBy')->eq($this->app->user->account)->set('lastEditedDate')->eq(helper::now())->where('id')->eq($oldTask->parent)->exec();
|
||||
$this->loadModel('action')->create('task', $task->id, 'unlinkParentTask', '', $oldTask->parent, '', false);
|
||||
|
||||
Reference in New Issue
Block a user