Apply for Zend Framework Certification Training

Zend Framework 2




$select = new Select('tablename');
$select->columns(array(new Expression('DISTINCT(id) as id')));

public function countFollowers($user_id) 
{
    $select = $this->select()
              ->distinct()
              ->where('user_id = ?', $user_id);

    $rowset = $this->fetchAll($select);
    $rowCount = count($rowset);

    return $rowCount;
}
                                    

< Join in Codeigniter Last >



Ask a question



  • Question:
    {{questionlistdata.blog_question_description}}
    • Answer:
      {{answer.blog_answer_description  }}
    Replay to Question


Back to Top