Proyectos de Subversion LeadersLinked - Services

Rev

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

Rev 324 Rev 325
Línea 42... Línea 42...
42
        return self::$_instance;
42
        return self::$_instance;
43
    }
43
    }
Línea 44... Línea 44...
44
    
44
    
45
    /**
45
    /**
-
 
46
     *
46
     *
47
     * @param int $company_id
47
     * @param int $user_id
48
     * @param int $user_id
48
     * @return HabitUserLogContent[]
49
     * @return HabitUserLogContent
49
     */
50
     */
50
    public function fetchAllByUserId($user_id)
51
    public function fetchOneMaxByCompanyIdAndUserId($company_id, $user_id)
51
    {
52
    {
Línea 52... Línea 53...
52
        $prototype = new HabitUserLogContent();
53
        $prototype = new HabitUserLogContent();
-
 
54
        
53
        
55
        $select = $this->sql->select(self::_TABLE);
-
 
56
        $select->where->equalTo('company_id', $company_id);
Línea 54... Línea 57...
54
        $select = $this->sql->select(self::_TABLE);
57
        $select->where->equalTo('user_id', $user_id);
55
        $select->where->equalTo('user_id', $user_id);
58
        $select->order('id desc');