Proyectos de Subversion LeadersLinked - Services

Rev

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

Rev 649 Rev 658
Línea 59... Línea 59...
59
        $select->where->equalTo('topic_id', $topic_id);
59
        $select->where->equalTo('topic_id', $topic_id);
Línea 60... Línea 60...
60
        
60
        
61
        $record = $this->executeFetchOneArray($select);
61
        $record = $this->executeFetchOneArray($select);
62
        return $record['total'];
62
        return $record['total'];
-
 
63
    }
-
 
64
 
-
 
65
    /**
-
 
66
     * 
-
 
67
     * @param int $topic_id
-
 
68
     * @return int
-
 
69
     */
-
 
70
    public function fetchTotalCountByTopicId($topic_id)
-
 
71
    {
-
 
72
        $select = $this->sql->select();
-
 
73
        $select->columns(['total' => new Expression('COUNT(*)')]);
-
 
74
        $select->from(self::_TABLE);
-
 
75
        $select->where->equalTo('topic_id', $topic_id);
-
 
76
        $select->where->equalTo('status', MicrolearningTopicCapsule::STATUS_ACTIVE);
-
 
77
 
-
 
78
        $record = $this->executeFetchOneArray($select);
-
 
79
        return $record['total'];
Línea 63... Línea 80...
63
    }
80
    }
64
    
81
    
65
    /**
82
    /**
66
     *
83
     *