application/models/mobile_api/Common_model.php
/* Fetch the perticular serch's chat messages*/
Fetch the perticular serch's chat messages
Fetch the perticular serch ' s chat messages
public function search_detail_chats($post_data){
        $searchId = $post_data['searchId'];
        $limit = $post_data['limit'];
        $offset = $post_data['offset'];
        $sql = "SELECT c.*,u.firstName,u.lastName FROM chat c,users u 
                WHERE  c.searchId = $searchId  AND c.deleteFlag !=1 AND c.userId = u.userId
                ORDER BY c.createdAt ASC
                LIMIT $offset,$limit";
        $record = $this->db->query($sql);
        if($record->num_rows()>0){
            return $record->result_array();
        }else{
            return false;
        }
    }
public function search_detail_chats ( $ post_data ) { $ searchId = $ post_data [ 'searchId' ] ; $ limit = $ post_data [ 'limit' ] ; $ offset = $ post_data [ 'offset' ] ; $ sql = " SELECT c.*,u.firstName,u.lastName FROM chat c,users u 
                WHERE  c.searchId =  $ searchId   AND c.deleteFlag !=1 AND c.userId = u.userId
                ORDER BY c.createdAt ASC
                LIMIT  $ offset , $ limit " ; $ record = $ this -> db -> query ( $ sql ) ; if ( $ record -> num_rows ( ) > 0 ) { return $ record -> result_array ( ) ; } else { return false ; } }
Fetch the perticular serch's chat messages
Fetch the perticular serch ' s chat messages