<?php 
class Ads_model extends CI_Model {
	public function _consruct(){
		parent::_construct();
	}



public function getAdsData($ads_id=''){

		
		

		$adsData = $this->db->query("SELECT * FROM ads WHERE id='$ads_id' AND status != '2' Order by id DESC");

		if(!empty($adsData)){
			return (empty($ads_id))?$adsData->result():$adsData->row();
		}
		return 0;
	}

public function update_ads($ads_id,$adsData)
	{


		$this->db->where('id',$ads_id);
		$qry = $this->db->update('ads',$adsData);
		return true;


	}

	

}