application/models/mobile_api/Common_model.php
/* Count the my tribe members list */
Count the my tribe members list
Count the my tribe members list
public function count_my_tribe_member($post_data){
        $searchId = $post_data['searchId'];
        $userId = $post_data['userId'];
        $sql = "SELECT COUNT(*)+1 FROM tribe WHERE searchId= $searchId AND fromuserId= $userId  AND deleteFlag !=1 AND status = 'accept'";
        $record = $this->db->query($sql);
        if($record->num_rows()>0){
            $count = $record->num_rows();
            $total_tribes = $count + 1;            
            return $total_tribes;
        }          
    }
public function count_my_tribe_member ( $ post_data ) { $ searchId = $ post_data [ 'searchId' ] ; $ userId = $ post_data [ 'userId' ] ; $ sql = " SELECT COUNT(*)+1 FROM tribe WHERE searchId=  $ searchId  AND fromuserId=  $ userId   AND deleteFlag !=1 AND status = 'accept' " ; $ record = $ this -> db -> query ( $ sql ) ; if ( $ record -> num_rows ( ) > 0 ) { $ count = $ record -> num_rows ( ) ; $ total_tribes = $ count + 1 ; return $ total_tribes ; } }
Count the my tribe members list
Count the my tribe members list