Proyectos de Subversion LeadersLinked - Antes de SPA

Rev

Rev 5836 | Rev 5839 | Ir a la última revisión | Mostrar el archivo completo | | | Autoría | Ultima modificación | Ver Log |

Rev 5836 Rev 5838
Línea 57... Línea 57...
57
        $select->order('id ASC');
57
        $select->order('id ASC');
Línea 58... Línea 58...
58
 
58
 
59
        return $this->executeFetchAllObject($select, $prototype);
59
        return $this->executeFetchAllObject($select, $prototype);
Línea -... Línea 60...
-
 
60
    }
-
 
61
 
-
 
62
 
-
 
63
    public function fetchAllDataByDateRange($user_id, $start_date, $end_date)
-
 
64
    {
-
 
65
        $select = $this->sql->select(self::_TABLE);
-
 
66
        $select->columns([
-
 
67
            'date',
-
 
68
            'activity' => new Expression('SUM(LABEL_RECORD_CONTACT_ADDED)'),
-
 
69
            'users' => new Expression('COUNT(user_id)')
-
 
70
        ]);
-
 
71
        $select->where->equalTo('user_id', $user_id);
-
 
72
        $select->where->between('added_on', $start_date, $end_date);
-
 
73
        $select->where->equalTo('activity', 'LABEL_RECORD_CONTACT_ADDED');
-
 
74
        $select->group('added_on');
-
 
75
        $select->order('added_on ASC');
-
 
76
 
-
 
77
        //echo $select->getSqlString($this->adapter->platform); exit;
-
 
78
 
-
 
79
 
-
 
80
        return $this->executeFetchAllArray($select);
60
    }
81
    }
61
 
82
 
62
    /**
83
    /**
63
     * 
84
     * 
64
     * @param int $id
85
     * @param int $id