application/models/mobile_api/Common_model.php
/* Get the shortlisted property comment files */
Get the shortlisted property comment files
Get the shortlisted property comment files
public function shortlisted_property_comments_file($post_data){
        $searchId = $post_data['searchId'];
        $shortlistedId = $post_data['shortlistedId'];
		 $sql = "SELECT
            CASE WHEN c.commentFile IS NOT NULL THEN CONCAT('".site_url()."', c.commentFile)
            ELSE '' END AS commentFile,
            c.fileType,
            CASE WHEN c.video_thumbnail IS NOT NULL THEN CONCAT('".site_url()."', c.video_thumbnail)
            ELSE '' END AS video_thumbnail
            FROM comments c WHERE c.searchId = $searchId AND c.shortlistedId = $shortlistedId AND c.deleteFlag !=1 AND c.commentFile !='' AND c.fileType !=''";
		$record = $this->db->query($sql);
        if($record->num_rows()>0){
            return $record->result_array();
        }
    }
public function shortlisted_property_comments_file ( $ post_data ) { $ searchId = $ post_data [ 'searchId' ] ; $ shortlistedId = $ post_data [ 'shortlistedId' ] ; $ sql = " SELECT
            CASE WHEN c.commentFile IS NOT NULL THEN CONCAT(' " . site_url ( ) . " ', c.commentFile)
            ELSE '' END AS commentFile,
            c.fileType,
            CASE WHEN c.video_thumbnail IS NOT NULL THEN CONCAT(' " . site_url ( ) . " ', c.video_thumbnail)
            ELSE '' END AS video_thumbnail
            FROM comments c WHERE c.searchId =  $ searchId  AND c.shortlistedId =  $ shortlistedId  AND c.deleteFlag !=1 AND c.commentFile !='' AND c.fileType !='' " ; $ record = $ this -> db -> query ( $ sql ) ; if ( $ record -> num_rows ( ) > 0 ) { return $ record -> result_array ( ) ; } }
Get the shortlisted property comment files
Get the shortlisted property comment files
//$sql = "SELECT c.commentFile,c.fileType,c.video_thumbnail FROM comments c WHERE c.searchId = $searchId AND c.shortlistedId = $shortlistedId AND c.deleteFlag !=1 AND c.commentFile !='' AND c.fileType !=''"; //$sql = "SELECT CONCAT('".site_url()."', c.commentFile) AS commentFile,c.fileType,CONCAT('".site_url()."', c.video_thumbnail) AS video_thumbnail FROM comments c WHERE c.searchId = $searchId AND c.shortlistedId = $shortlistedId AND c.deleteFlag !=1 AND c.commentFile !='' AND c.fileType !=''";