Proyectos de Subversion LeadersLinked - Services

Rev

Rev 632 | Mostrar el archivo completo | | | Autoría | Ultima modificación | Ver Log |

Rev 632 Rev 646
Línea 76... Línea 76...
76
        $select->where->equalTo('user_id', $user_id);
76
        $select->where->equalTo('user_id', $user_id);
Línea 77... Línea 77...
77
        
77
        
78
        $record = $this->executeFetchOneArray($select);
78
        $record = $this->executeFetchOneArray($select);
79
        return $record['total'];
79
        return $record['total'];
80
    }
80
    }
-
 
81
 
-
 
82
    /**
-
 
83
     * 
-
 
84
     * @param int $company_id
-
 
85
     * @param int $topic_id
-
 
86
     * @param int $user_id
-
 
87
     * @return int
-
 
88
     */
-
 
89
    public function fetchCountByCompanyIdAndTopicIdAndUserId($company_id, $topic_id, $user_id)
-
 
90
    {
-
 
91
        $select = $this->sql->select();
-
 
92
        $select->columns(['total' => new Expression('COUNT(*)')]);
-
 
93
        $select->from(self::_TABLE);
-
 
94
        $select->where->equalTo('company_id', $company_id);
-
 
95
        $select->where->equalTo('topic_id', $topic_id);
81
    
96
        $select->where->equalTo('user_id', $user_id);
-
 
97
 
-
 
98
        $record = $this->executeFetchOneArray($select);
-
 
99
        return $record['total'];
Línea 82... Línea 100...
82
   
100
    }
83
    
101
    
84
    /**
102
    /**
85
     * 
103
     *