Proyectos de Subversion LeadersLinked - Services

Rev

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

Rev 307 Rev 308
Línea 65... Línea 65...
65
        return $this->executeFetchOneObject($select, $prototype);
65
        return $this->executeFetchOneObject($select, $prototype);
66
    }
66
    }
Línea 67... Línea 67...
67
 
67
 
68
    /**
68
    /**
69
     *
-
 
70
     * @param int $user_id
69
     *
71
     * @param int $goal_id
70
     * @param int $goal_id
72
     * @return HabitGoalSkill
71
     * @return HabitGoalSkill
73
     */
72
     */
74
    public function fetchAllByUserIdAndGoalId($user_id, $goal_id)
73
    public function fetchAllByGoalId($goal_id)
75
    {
74
    {
76
        $select = $this->sql->select(self::_TABLE);
-
 
77
        $select->where->equalTo('user_id', $user_id);
75
        $select = $this->sql->select(self::_TABLE);
78
        $select->where->equalTo('goal_id', $goal_id);
-
 
-
 
76
        $select->where->equalTo('goal_id', $goal_id);
Línea 79... Línea 77...
79
        $select->limit(1);
77
 
80
        
78
        
81
        $prototype = new HabitGoalSkill();
79
        $prototype = new HabitGoalSkill();
Línea 126... Línea 124...
126
    }
124
    }
Línea 127... Línea 125...
127
    
125
    
128
    
126
    
129
    /**
-
 
130
     *
127
    /**
131
     * @param int $user_id
128
     *
132
     * @param int $goal_id
129
     * @param int $goal_id
133
     * @return boolean
130
     * @return boolean
134
     */
131
     */
135
    public function deleteAllByUserIdAndGoalId($user_id, $goal_id)
132
    public function deleteAllByGoalId($goal_id)
136
    {
-
 
137
        $delete = $this->sql->delete(self::_TABLE);
133
    {
Línea 138... Línea 134...
138
        $delete->where->equalTo('user_id', $user_id);
134
        $delete = $this->sql->delete(self::_TABLE);
Línea 139... Línea 135...
139
        $delete->where->equalTo('goal_id', $goal_id);
135
        $delete->where->equalTo('goal_id', $goal_id);