Exemple #1
0
 public function getTasksFromOwner($type)
 {
     $bind = ['partnerId' => App::getPartnerId(), 'ownerId' => App::getUserId()];
     $where = "partnerId = :partnerId AND ownerId = :ownerId";
     if ($type != 'all') {
         $where .= ' AND `type` = :type';
         $bind['type'] = $type;
     }
     return $this->db->select('tasks', $where, $bind);
 }