php - DISTINCT fields NOT to show up in cakephp 1.3 -
i'm running feeds table don't want distinct fields "null" retrieve.
$this->feed->recursive = 0; $this->paginate = array('feed' => array( 'limit' => 6, 'fields' => 'distinct feed.* not null', 'conditions' => array('feed.member_id' => $friends_ids), 'order' => array('feed.created' => 'desc'), )); $notes = $this->paginate('feed'); $this->set('notes', $notes); // debug($notes); unset($notes);
this gives me error. warning (512): sql error: 1054: unknown column 'feed.* not null'. running on cakephp 1.3 thanks.
try moving null check conditions array.
'fields' => 'distinct feed.*', 'conditions' => array( 'feed.member_id' => $friends_ids, 'feed.the_field_to_check not null' ),
Comments
Post a Comment