application/models/Dashboard_model.php
/*function for adding most popular destination*/
function for adding most popular destination
function for adding most popular destination
function popularDestination($data,$table){
				if($this->db->insert($table, $data)){
					$status['top_destination_status'] = "Yes";
					$this->db->where('spots.id', $data['spot_id']);
					$this->db->update('spots', $status);
					return "Added succesfully";
				}else{
					return "Error";
				}
		}
function popularDestination ( $ data , $ table ) { if ( $ this -> db -> insert ( $ table , $ data ) ) { $ status [ 'top_destination_status' ] = " Yes " ; $ this -> db -> where ( 'spots.id' , $ data [ 'spot_id' ] ) ; $ this -> db -> update ( 'spots' , $ status ) ; return " Added succesfully " ; } else { return " Error " ; } }
function for adding most popular destination
function for adding most popular destination