Proyectos de Subversion LeadersLinked - Antes de SPA

Rev

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

Rev 112 Rev 3831
Línea 145... Línea 145...
145
        //echo $select->getSqlString($this->adapter->platform); exit;
145
        //echo $select->getSqlString($this->adapter->platform); exit;
Línea 146... Línea 146...
146
        
146
        
147
        return $this->executeFetchAllObject($select, $prototype);
147
        return $this->executeFetchAllObject($select, $prototype);
Línea -... Línea 148...
-
 
148
    }
-
 
149
    
-
 
150
    /**
-
 
151
     *
-
 
152
     * @param int $company_id
-
 
153
     * @param int $topic_id
-
 
154
     * @return int
-
 
155
     */
-
 
156
    public function fetchCountByCompanyIdAndTopicId($company_id, $topic_id)
-
 
157
    {
-
 
158
       
-
 
159
        
-
 
160
        $select = $this->sql->select(self::_TABLE);
-
 
161
        $select->columns(['total' => new Expression('COUNT(*)')]);
-
 
162
        $select->where->equalTo('company_id', $company_id);
-
 
163
        $select->where->equalTo('topic_id', $topic_id);
-
 
164
 
-
 
165
        $record = $this->executeFetchOneArray($select);
-
 
166
        return $record['total'];
-
 
167
        
-
 
168
    }
-
 
169
    
Línea 148... Línea 170...
148
    }
170
    
149
    
171
    
Línea 150... Línea 172...
150
    
172