Proyectos de Subversion LeadersLinked - Antes de SPA

Rev

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

Rev 6521 Rev 6547
Línea 75... Línea 75...
75
        
75
        
76
        $select = $this->sql->select(self::_TABLE);
76
        $select = $this->sql->select(self::_TABLE);
77
        $select->columns(['total' => new Expression('COUNT(*)'), 'reaction']);
77
        $select->columns(['total' => new Expression('COUNT(*)'), 'reaction']);
78
        $select->where->in('my_coach_answer_id', $selectIn);
78
        $select->where->in('my_coach_answer_id', $selectIn);
79
        $select->where->equalTo('relational', ContentReaction::RELATIONAL_MY_COACH);
79
        $select->where->equalTo('relational', ContentReaction::RELATIONAL_MY_COACH);
Línea 80... Línea 80...
80
        $select->group('reaction');
80
        //$select->group('reaction');
-
 
81
        
81
        
82
        $record = $this->executeFetchOneArray($select);
Línea 82... Línea 83...
82
        return $this->executeFetchAllArray($select);
83
        return $record['total'];
83
    }
84
    }
84
    
85
    
Línea 91... Línea 92...
91
    {
92
    {
92
        $select = $this->sql->select(self::_TABLE);
93
        $select = $this->sql->select(self::_TABLE);
93
        $select->columns(['total' => new Expression('COUNT(*)'), 'reaction']);
94
        $select->columns(['total' => new Expression('COUNT(*)'), 'reaction']);
94
        $select->where->equalTo('my_coach_answer_id', $my_coach_answer_id);
95
        $select->where->equalTo('my_coach_answer_id', $my_coach_answer_id);
95
        $select->where->equalTo('relational', ContentReaction::RELATIONAL_MY_COACH);
96
        $select->where->equalTo('relational', ContentReaction::RELATIONAL_MY_COACH);
-
 
97
 
-
 
98
        $record = $this->executeFetchOneArray($select);
-
 
99
        return $record['total'];
-
 
100
    }
-
 
101
    
-
 
102
    /*
-
 
103
    public function fetchCountByMyCoachAnswerId($my_coach_answer_id)
-
 
104
    {
-
 
105
        $select = $this->sql->select(self::_TABLE);
-
 
106
        $select->columns(['total' => new Expression('COUNT(*)'), 'reaction']);
-
 
107
        $select->where->equalTo('my_coach_answer_id', $my_coach_answer_id);
-
 
108
        $select->where->equalTo('relational', ContentReaction::RELATIONAL_MY_COACH);
96
        $select->group('reaction');
109
        $select->group('reaction');
Línea 97... Línea 110...
97
        
110
        
98
        return $this->executeFetchAllArray($select);
111
        return $this->executeFetchAllArray($select);
-
 
112
    }
Línea 99... Línea 113...
99
    }
113
     */
100
    
114
    
101
    
115