application/models/Dashboard_model.php
/*function for deleting a data in database*/
function for deleting a data in database
function for deleting a data in database
public function removeTopDestination($id,$table){
			$this->db->where($table.'.spot_id', $id);
			if($this->db->delete($table)){
				$status['top_destination_status'] = "";
				$this->db->where('spots.id', $id);
				$this->db->update('spots', $status);
				return "Deleted succesfully";
			}else{
				return "Error";
			}		
	}
public function removeTopDestination ( $ id , $ table ) { $ this -> db -> where ( $ table . '.spot_id' , $ id ) ; if ( $ this -> db -> delete ( $ table ) ) { $ status [ 'top_destination_status' ] = " " ; $ this -> db -> where ( 'spots.id' , $ id ) ; $ this -> db -> update ( 'spots' , $ status ) ; return " Deleted succesfully " ; } else { return " Error " ; } }
function for deleting a data in database
function for deleting a data in database