HOME


sh-3ll 1.0
DIR:/home/medisavehealth/public_html/application/models/pages/
Upload File :
Current File : /home/medisavehealth/public_html/application/models/pages/PortfolioModel.php
<?php
defined('BASEPATH') OR exit('No direct script access allowed');

class PortfolioModel extends CI_Model{

	public function exist_image($portfolio_id) {
		$this->db->select("picture");
		$this->db->where('portfolio_id',$portfolio_id);
		$query = $this->db->get('portfolio');
		return $query->row();
	}
	public function exist_url($url, $id = null)
	{
		$this->db->where('Trim(LOWER(url))', $url);
		if ($id != null) {
			$this->db->where_not_in('portfolio_id', $id);
		}
		$query = $this->db->get('portfolio');
		$rs =  $query->num_rows();
		if ($rs > 0) {
			return false;
		} else {
			return true;
		}
	}
}