Right, I figured I would simply have a couple of functions which do almost the same thing, but provide me with different results, problem is, they do exactly the same thing when called. Only the Search function works.
public function search() {
$criteria = new CDbCriteria;
$criteria->compare('id', $this->id);
$criteria->compare('login', $this->login, true);
$criteria->compare('contact_email', $this->contact_email, true);
$criteria->compare('first_name', $this->first_name, true);
etc etc etc
$criteria->compare('created_at', $this->created_at, true);
return new CActiveDataProvider(get_class($this), array(
'criteria' => $criteria,
'pagination' => array(
'PageSize' => 25
),
'sort' => array(
'defaultOrder' => 'last_request DESC',
),
));
}
public function statistics() {
$criteria = new CDbCriteria;
$criteria->compare('login', $this->login, true);
$criteria->compare('contact_email', $this->contact_email, true);
$criteria->compare('first_name', $this->first_name, true);
$criteria->compare('last_notified', $this->last_notified, true);
return new CActiveDataProvider(get_class($this), array(
'criteria' => $criteria,
'pagination' => array(
'PageSize' => 25
),
'sort' => array(
'defaultOrder' => 'last_request DESC',
),
));
}