Proyectos de Subversion LeadersLinked - Antes de SPA

Rev

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

Rev 280 Rev 4776
Línea 129... Línea 129...
129
        //echo $select->getSqlString($this->adapter->platform); exit;
129
        //echo $select->getSqlString($this->adapter->platform); exit;
Línea 130... Línea 130...
130
        
130
        
131
        $record = $this->executeFetchOneArray($select);
131
        $record = $this->executeFetchOneArray($select);
132
        return $record['total'];
132
        return $record['total'];
-
 
133
    }
-
 
134
    
-
 
135
    /**
-
 
136
     *
-
 
137
     * @param int $company_id
-
 
138
     * @param int $topic_id
-
 
139
     * @param int $capsule_id
-
 
140
     * return int
-
 
141
     */
-
 
142
    public function fetchCountByCompanyIdAndTopicIdAndCapsuleId($company_id, $topic_id, $capsule_id)
-
 
143
    {
-
 
144
 
-
 
145
        
-
 
146
        $select = $this->sql->select();
-
 
147
        $select->columns(['total' => new Expression('COUNT(*)')]);
-
 
148
        $select->from(self::_TABLE);
-
 
149
        $select->where->equalTo('company_id', $company_id);
-
 
150
        $select->where->equalTo('topic_id', $topic_id);
-
 
151
        $select->where->equalTo('capsule_id', $capsule_id);
-
 
152
        
-
 
153
        
-
 
154
        //echo $select->getSqlString($this->adapter->platform); exit;
-
 
155
        
-
 
156
        $record = $this->executeFetchOneArray($select);
-
 
157
        return $record['total'];
Línea 133... Línea 158...
133
    }
158
    }
134
 
159
 
135
    
160